I've just built a server to mirror my current (production) web server. But for some reason, when Apache starts during boot, it won't automatically start in SSL mode. However, if I shut apache down and start it with the 'startssl' option, SSL works fine. I don't think it is a problem with the config files since I copied the entire /etc/apache2 directory over from the production server.
Before restarting Apache with the 'startssl' option, if I try to browse to the page, Firefox says:
Code:
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
Searching Google for this error produces unrelated solutions. I also get this error in the error_log:
Code:
Invalid method in request \x16\x03\x01\x97\x01
...which leads me to believe that SSL isn't even running, but if I netstat port 443, I get:
Code:
tcp 0 0 :::443 :::* LISTEN
I've also made sure that the modules (a2enmod -l) is the same on this server as on the production server. I'm currently at a loss for ideas.
Here's the relevant parts of my vhosts file:
Code:
<IfDefine SSL>
<IfDefine !NOSSL>
<VirtualHost *:443>
DocumentRoot /srv/www/htdocs
ServerName sub.domainname.com
SSLCertificateFile /etc/apache2/ssl.crt/server.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/server.key
SSLEngine on
</VirtualHost>
</IfDefine>
</IfDefine>
Any clues???