Forum Moderators: phranque

Message Too Old, No Replies

Apache SSL issues

         

samuri

12:45 pm on Mar 5, 2010 (gmt 0)

10+ Year Member



I'm having problems connecting to an apache enabled website via https. The site works fine using http. I've been through the ssl enabling process and have generated the certs and placed them in the appropriate directories. The site works fine if I connect using [1.1.1.1:443...] but not if I use [1.1.1.1...] which I'm assuming means the server is listening on 443 but is not encrypting. (confirmed by if I connect using telnet on 443 and then run a GET, standard HTML is returned)

I have apache2 running on ubuntu. ssl-mod is enabled (the appropriate links are in the mods-enabled directory), I've edited the default-ssl file in the sites available directory and soft linked from the sites-enabled directory. The top of the default-ssl file looks like this...

NameVirtualHost 192.168.2.101:443
<VirtualHost 192.168.2.101:443>
ServerAdmin webmaster@localhost

DocumentRoot /var/www/test
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

SSLEngine on
SSLCertificateFile /etc/ssl/certs/mycert.crt
SSLCertificateKeyFile /etc/ssl/private/mycert.key
.....

I've tried using <VirtualHost *:443> and have tried removing the NameVirtualHost line but nothing seems to work.

When the connection fails I get
"SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)"

in the browser and
"Invalid method in request \x16\x03\x01"
in the apache error log.

I've been searching the internet for ages and have tried all suggestions I've found but no joy. I expect it's something very simple but I just can't see it.

Hope someone can help here, I'm tearing my hair out. I've been working on this for about a week now on and off.

samuri

1:48 pm on Mar 6, 2010 (gmt 0)

10+ Year Member



I've worked it out. I realised I had a syntax error in my virtual hosts config but apache wasn't picking it up when it restarted, i.e. the enabled sites files weren't being loaded. I looked in the apache2.conf file and saw that that load enabled sites line was commented out, uncommented it and everything works fine.

jdMorgan

12:24 am on Mar 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for posting your solution. Your problem was kind of a head-scratcher...

Jim