logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Problem with sub domain
Author
adm



Joined: 02 Nov 2017
Posts: 1
Location: USA

PostPosted: Thu 02 Nov '17 21:00    Post subject: Problem with sub domain Reply with quote

Server version: 5.7.20-0ubuntu0.16.04.1 - (Ubuntu)
Protocol version: 10
PHP version: 7.0.22
Apache version 2.4.18

Greetings!

So, I came to a point wehen I need to ask for suggestion:

My virual server set up for xxx.com with ssl cert., takes over the traffic for subdomain set up for aaa.xxx.com also with ssl.

Another words, if i punch aaa.xxx.com in a browser the xxx.com pops up instead of aaa.xxx.com

Kindly take a look at both v-servers and let me please know where did I mess up...?

xxx.com

<VirtualHost *:80>
ServerName www.organiccoffeereserve.com
ServerAdmin webmaster@adm.media
ServerAlias organiccoffeereserve.com
Redirect permanent / https://www.organiccoffeereserve.com/

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:443>
ServerName www.organiccoffeereserve.com
ServerAdmin webmaster@adm.media
ServerAlias organiccoffeereserve.com
DocumentRoot /var/www/ocr/html

SSLEngine on
SSLCertificateFile /etc/ssl/ssl/www.organiccoffeereserve.com.crt
SSLCertificateKeyFile /etc/ssl/ssl/www.organiccoffeereserve.com.key
SSLCertificateChainFile /etc/ssl/ssl/cabundle.crt

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

_______________________

aaa.xxx.com

<VirtualHost *:80>
ServerName shop.organiccoffeereserve.com
ServerAdmin webmaster@adm.media
DocumentRoot /var/www/ocr/shop
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:443>
ServerName shop.organiccoffeereserve.com
ServerAdmin webmaster@adm.media
DocumentRoot /var/www/ocr/shop

SSLEngine on
SSLOptions +StrictRequire
SSLCertificateFile /etc/apache2/ssl-certs/shop.organiccoffeereserve.com/shop.ocr.crt
SSLCertificateKeyFile /etc/apache2/ssl-certs/shop.organiccoffeereserve.com/shop.ocr.key

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

+++++++++++++++++

I trully appreciate any suggestions.
Many thanks!
Maciek
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 05 Dec '17 0:26    Post subject: Reply with quote

Did you enable the vhosts by using a2ensite or creating a symlink from that vhost file from sites-available to sites-enabled?
Back to top


Reply to topic   Topic: Problem with sub domain View previous topic :: View next topic
Post new topic   Forum Index -> Apache