Default Apache test page when on SSL

jemminger asked:

I have the exact same configuration for my rails site on a staging server and a production server, aside from the “staging” vs “production” in the file paths.

They’re both set up to redirect all requests on port 80 to the SSL version on 443.

This works properly on staging, but in production it’s just showing the default Apache test page. Apache doesn’t seem to be forwarding the requests to passenger. My rails logs are empty. The apache logs show all of the requests, but there are no errors.

Any ideas?

At the end of httpd.conf:

LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/ext/apache2/
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19
PassengerRuby /usr/local/bin/ruby

Include /etc/httpd/conf/extra/httpd-vhosts.conf


NameVirtualHost *:80

<VirtualHost *:80>
  Redirect permanent /

   DocumentRoot /home/goodtogo/production/current/public
   PassengerMaxPoolSize 18
   RailsEnv production

   SSLEngine on
   SSLCertificateFile    /etc/pki/tls/certs/ca.crt
   SSLCertificateKeyFile /etc/pki/tls/private/ca.key
   SSLCACertificateFile  /etc/pki/tls/certs/ca.crt

   <Directory /home/goodtogo/production/current/public>
     Options -MultiViews
     Allow from all

My answer:

You used a fully qualified domain name in your SSL <VirtualHost>.


Apache recommends against this.

A fully qualified domain name for the IP address of the virtual host (not recommended);

To resolve the issue, use the IP address or * instead:

<VirtualHost *:443>

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.