I set up Comodo SSL on CentOS 6.7 and Apache/2.2.15 and we are running a CakePHP application on the server. When I go to http/domain its working but when I go to httpS/domain it says 404 Not Found (even though I see lock icon and https in green color).
Here's part of my etc/httpd/conf/httpd.conf file:
Include conf.d/*.conf
Listen 80
<VirtualHost *:80>
ServerAdmin info@domain
DocumentRoot /var/www/vhosts/domain/httpdocs/app/webroot/
ServerName domain
<Directory /var/www/vhosts/domain/httpdocs>
Allowoverride All
</Directory>
</VirtualHost>
And /etc/httpd/conf.d/ssl.conf contains:
Listen 443
<VirtualHost *:443>
DocumentRoot /var/www/vhosts/domain/httpdocs/app/webroot/
ServerName domain
SSLEngine on
SSLCertificateFile /etc/httpd/ssl/domain.crt
SSLCertificateKeyFile /etc/httpd/ssl/private.key
SSLCertificateChainFile /etc/httpd/ssl/domain.ca-bundle
</VirtualHost>
I've done httpd stop and start multiple times, and also tried httpS/domain:80 but that gives an error: This webpage is not available (ERR_CONNECTION_CLOSED).
Can the DocumentRoot be the same? If not then how do I manage that since copy/pasting our application code in another folder is not feasible.
Any thoughts on what i'm doing wrong?
Best Answer
I changed
<VirtualHost *:443>
to<VirtualHost domain.com:443>
and it worked.