Thank you in advance for your support! We have been working on this for a couple days, lots of research and no luck with a solution.

Our web server is running on centos6 with apache (httpd-2.2.15-53) and mod_ssl using vhosts in the /etc/httpd/conf.d/vhosts/*.conf directory.

After setting up the ssl certs, and editing /etc/httpd/conf.d/ssl.conf, and /etc/httpd/conf.d/vhosts/example.conf (see below), now when we access the site via https://example.com we get the default Apache 2 Test Page. If we remove the /etc/httpd/conf.d/welcome.conf file and restart httpd we see the contents of the /var/www/html directory, which is the DocumentRoot in the /etc/httpd/conf/httpd.conf file.

Whats did we miss in our setup that is causing https://example.com to redirect to the default Apache 2 Test Page?

Here is the vhost file:

<VirtualHost *:80>
ServerAdmin myname@example.com
DocumentRoot /home/www/example
ServerName example.com
ServerAlias example.com www.example.com
DirectoryIndex index.php
ErrorLog logs/example.com-error_log
CustomLog logs/example.com-access_log common
CustomLog logs/example.com-access_log_urchin.log urchin
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/htm
SSLCertificateFile /usr/local/ssl/crt/public.crt
SSLCertificateKeyFile /usr/local/ssl/private/private.key
SSLCertificateChainFile /usr/local/ssl/crt/intermediate.crt
#DeflateFilterNote Input input_info
#DeflateFilterNote Output output_info
#DeflateFilterNote Ratio ratio_info
#LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
#CustomLog /var/log/httpd/example.deflate_log deflate
<Directory "/home/www/example/">
    AllowOverRide All
RewriteEngine On

# grep -ir 443 /etc/httpd/conf*

/etc/httpd/conf.d/ssl.conf:Listen 443 /etc/httpd/conf.d/ssl.conf: /etc/httpd/conf.d/ssl.conf:#ServerName www.example.com:443

ss -antp | grep 443

LISTEN 0 128 :::443 :::* users:(("httpd",7097,6),("httpd",7441,6),("httpd",7466,6),("httpd",7549,6),("httpd",7551,6),("httpd",7552,6),("httpd",7557,6),("httpd",7559,6),("httpd",7560,6),("httpd",7562,6),("httpd",7564,6),("httpd",7614,6),("httpd",7616,6),("httpd",7619,6),("httpd",7621,6),("httpd",7622,6),("httpd",7625,6),("httpd",7667,6),("httpd",7669,6),("httpd",7670,6),("httpd",7671,6)) SYN-RECV 0 0 ::ac05:500:ffff:0:443 839::458f:6690:100:0:16413 ESTAB 0 122640 ::ffff: ::ffff: users:(("httpd",7559,24)) TIME-WAIT 0 0 ::ffff: ::ffff: TIME-WAIT 0 0 ::ffff: ::ffff: TIME-WAIT 0 0 ::ffff: ::ffff:

apachectl -S

VirtualHost configuration: wildcard NameVirtualHosts and default servers: default:443 example.com (/etc/httpd/conf.d/ssl.conf:74) *:80 is a NameVirtualHost default server localhost (/etc/httpd/conf.d/vhosts/000default.conf:1) port 80 namevhost localhost (/etc/httpd/conf.d/vhosts/000default.conf:1) port 80 namevhost example1.com (/etc/httpd/conf.d/vhosts/example1.conf:1) alias example1.com alias www.example1.com port 80 namevhost example.com (/etc/httpd/conf.d/vhosts/mokum.conf:1) alias example.com alias www.example.com

Thank you!

2 Answers 2


That's the config file for Apache listening on port 80. However, HTTPS is delivered via port 443. It's likely that you have a rogue site remapping port 443 to the default directory (Possibly even Apache's own /etc/apache2/sites-available/default-ssl.conf).

  • Thank you for your reply! When we tried <VirtualHost *.443 *:80> we got a ssl duplicate error. We need both 80 and 443 for the site, i.e. 80 for 98% of the content and 443 for only secure credit card transactions. Jun 3, 2016 at 0:39

You need to determine which conf files are being loaded (likely conf/*.conf , vhost/*.conf .. trace it from the httpd.conf). Apache is reading multiple conf files, one of them already has a :443 that is listening on port 443. You only need the SSL configuration in the 2nd block/conf file for the :443 listener (this is why you are getting a default page, you don't have anything configured in the current default ssl conf).

  • Thank you for your support. I've just posted more details above. I'm not sure how to determine which file config is getting in the way. Any tips on tracing which file is loading 443? Jun 3, 2016 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.