Hi! I have the following setup (please note there are two IPs):
NameVirtualHost IP1:80
<VirtualHost IP1:80>
ServerName main_server:80
DocumentRoot "/var/www/html"
</VirtualHost>
<VirtualHost IP1:80>
ServerName 2nd_server:80
DocumentRoot "/var/www/2nd_server"
</VirtualHost>
<VirtualHost IP2:80>
ServerName 3rd_server:80
DocumentRoot "/var/www/3rd_server"
</VirtualHost>
<VirtualHost IP1:443>
ServerName main_server:443
DocumentRoot "/var/www/secure_html"
SSLEngine on
...
</VirtualHost>
I can go to main_server, 2nd_server and 3rd_server and go to the respective DocumentRoot. However, when I go to
https://main_server,
I am directed to the DocumentRoot of main_server (/var/www/html) with https. Does any one have any suggestion? Is it because ServerName of the SSL server is also called main_server? (I would prefer that
http://main_server goes to /var/www/html and
https://main_server goes to /var/www/secure_html) Thank you.