Now (Rails version: 3.2.13, Ruby version: 2.1.9p490) I have a sles machine and I've got the following files to make it from http (which works) to https (does not work) connection by hand:
- cacert.crt - intermediatcacert.crt - rootcert.crt - key.pem I took over this system from a former colleague and I really don't know how to properly configure this. In the default-ssl.conf I inserted the paths to the upper files but it does not work when I restart the apache.
These are the following config files:
/etc/apache2/vhost.d/default.conf
<VirtualHost *:80> LoadModule passenger_module /home/xxx/.rvm/gems/ruby-2.1.10/gems/passenger-4.0.41/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /home/xxx/.rvm/gems/ruby-2.1.10/gems/passenger-4.0.41 PassengerDefaultRuby /home/xxx/.rvm/gems/ruby-2.1.10/wrappers/ruby </IfModule> DocumentRoot /home/xxx/yyy/public ServerAdmin [email protected] ServerName mywebsite.com ErrorLog /var/log/apache2/error_log CustomLog /var/log/apache2/access_log combined HostnameLookups Off UseCanonicalName Off ServerSignature On <Directory /home/xxx/yyy/public> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all Options -Multiviews RailsEnv development </Directory> RewriteEngine On RewriteRule "^/?$" "http://mywebsite.com/" </VirtualHost> And here the default-ssl.conf
<IfDefine SSL> <IfDefine !NOSSL> <VirtualHost _default_:443> LoadModule passenger_module /home/xxx/.rvm/gems/ruby-2.1.10/gems/passenger-4.0.41/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /home/xxx/.rvm/gems/ruby-2.1.10/gems/passenger-4.0.41 PassengerDefaultRuby /home/xxx/.rvm/gems/ruby-2.1.10/wrappers/ruby </IfModule> DocumentRoot "/srv/www/vhosts/default-ssl" DocumentRoot "/home/xxx/yyy/public" ServerName mywebsite.com:443 ServerAdmin [email protected] ErrorLog /var/log/apache2/error-ssl_log TransferLog /var/log/apache2/access-ssl_log CustomLog /var/log/apache2/ssl_request_log ssl_combined # <Directory "/srv/www/vhosts/default-ssl"> # Options FollowSymLinks # AllowOverride None # Order allow,deny # Allow from all # </Directory> # RackBaseURI /xxx <Directory "/home/xxx/yyy/public"> Order allow,deny AllowOverride all Allow from all Options -Multiviews Indexes RailsEnv production </Directory> SSLEngine on SSLProtocol all -SSLv2 -SSLv3 SSLCipherSuite ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!MD5:@STRENGTH SSLCertificateFile /etc/apache2/ssl.crt/cert-xxx.pem SSLCertificateKeyFile /root/key.pem SSLCertificateChainFile /etc/apache2/intermediatecacert/intermediatecacert.crt SSLCACertificateFile /etc/apache2/rootcert/rootcert.crt <Files ~ "\.(cgi|shtml|phtml|php3?)$"> SSLOptions +StdEnvVars </Files> <Directory "/srv/www/cgi-bin"> SSLOptions +StdEnvVars </Directory> RewriteEngine On RewriteRule "^/?$" "https://mywebsite.com/" </VirtualHost> </IfDefine> </IfDefine> What am I missing?
Thank you in adcanve!
listendirective in there, but that could well be in another file. If Apache starts, run one ofss -tlnp | columnornetstat -tlnp(depending on which is installed) and check for a line with 443 in it. If found, the process owning that should be Apache.error_loghas so much information I cannot interpet correctly. What would be a common error in the log file?ss -tlnp | columnit shows me only one line likeLISTEN ...*:80and no port 443. So is this a sign that it does not listen on port 443?