Apache is ignoring the DocumentRoot setting in my VirtualHost configuration.
The site loads the correct DocumentRoot via http on port 80 but when accessed over https on port 443 it loads the apache's default DocumentRoot at /var/www/html
instead of var/www/mysite
.
The SSL certificate does load correctly, it's just the DocumentRoot that is being ignored.
I'm running Apache/2.4.6 on CentOS.
Configuration as follows:
# /etc/httpd/vhost.d/mysite.mylabserver.com_httpd.conf
<VirtualHost *:80>
ServerName mysite.labserver.com
ServerAlias mysite
DocumentRoot /var/www/mysite
</VirtualHost>
<VirtualHost *:443>
ServerName mysite.mylabserver.com
ServerAlias mysite
DocumentRoot /var/www/mysite
SSLEngine on
SSLCertificateFile /etc/httpd/ssl-certs/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl-certs/apache.key
</VirtualHost>
default:443
Listen 443 https
to my config (outside the VirtualHost). Please include in answer. :)