I have been running two Rails apps on Apache/Passenger and CentOS 6 in different subdirectories and using SSL for some time.
However, I just migrated to a new server running CentOS 7, and on the new server the apps work only if I don't use SSL. If I use SSL, then all I get is "404 Not Found".
Server version: Apache/2.4.6 (CentOS)
Phusion Passenger version 4.0.59
When I configure the apps for non-SSL, I can tell that the very first request is going to Passenger, because it takes it a little time to load everything. On the other hand, when I change to SSL, the response (Not Found) is immediate, so maybe it's not even getting to Passenger. I can't see anything in the error logs (/var/log/httpd/*_error_log), other than Not Found, which doesn't tell me anything.
Can anyone tell me if there is any way to debug what is going on? Is there some other error log specific to Passenger that may provide some information? I have not been able to find anything on the web that mentions both multiple apps in separate directories and SSL.
Here is the non-SSL configuration and the responses to the URLs:
# /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ErrorLog logs/https_error_log
Alias /app-1 /var/www/phusion/app-1/public
<Location "/app-1">
PassengerBaseURI /app-1
PassengerAppRoot /var/www/phusion/app-1
</Location>
<Directory "/var/www/phusion/app-1/public">
Options -MultiViews
Allow from all
AllowOverride all
Require all granted
</Directory>
Alias /app-2 /var/www/phusion/app-2/public
<Location "/app-2">
PassengerBaseURI /app-2
PassengerAppRoot /var/www/phusion/app-2
</Location>
<Directory "/var/www/phusion/app-2/public">
Options -MultiViews
Allow from all
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
Here is the pretty much identical SSL configuration and the responses to the URLs:
# /etc/httpd/conf/httpd.conf
<VirtualHost *:443>
ErrorLog logs/https_error_log
Alias /app-1 /var/www/phusion/app-1/public
<Location "/app-1">
PassengerBaseURI /app-1
PassengerAppRoot /var/www/phusion/app-1
</Location>
<Directory "/var/www/phusion/app-1/public">
Options -MultiViews
Allow from all
AllowOverride all
Require all granted
</Directory>
Alias /app-2 /var/www/phusion/app-2/public
<Location "/app-2">
PassengerBaseURI /app-2
PassengerAppRoot /var/www/phusion/app-2
</Location>
<Directory "/var/www/phusion/app-2/public">
Options -MultiViews
Allow from all
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
# requests
As you can see, the only thing that changes is the port number.
For SSL, the certificate files configuration is in /etc/httpd/conf.d/ssl.conf. I have also tried putting the following inside the VirtualHost definition (matches the ssl.conf information exactly), but nothing helps:
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/pki/CA/certs/xxx.crt
SSLCertificateChainFile /etc/pki/CA/certs/yyy.crt
SSLCertificateKeyFile /etc/pki/CA/certs/foo.example.com.key
The SSL configuration is OK, because if I remove the Rails stuff and just test accessing a static index.html page then everything works fine.
I have turned SELinux off, by the way.
Any help you could provide would be very much appreciated.