Results 1 to 6 of 6

Thread: [SOLVED] Apache + SSL returns \x16\x03\x01 error

  1. #1
    Join Date
    Aug 2005
    Location
    Herts, UK
    Beans
    55
    Distro
    Ubuntu 8.04 Hardy Heron

    [SOLVED] Apache + SSL returns \x16\x03\x01 error

    I'm trying to extend my 8.04 web server so that it can also use HTTPS; I have a default LAMP install and followed the guide for SSL located at https://help.ubuntu.com/community/fo...c03278cb115738, generating a certificate via the 7.10 method shown.

    I then copied my available-sites/default config to available-sites/ssl, modified it so the port was 443 not 80, enabled it and reloaded, but for some reason, Apache restarts just fine, but any attempts to access my webserver with https results in a "ssl_error_rx_record_too_long" error in my browser, and in the Apache error log I get the error "[error] [client 192.168.1.100] Invalid method in request \x16\x03\x01". Accessing the server by ordinary http still works absolutely fine and Apache returns no restart errors or warnings.

    I don't know if it's relevant but below is my sites-available/ssl file:
    Code:
    NameVirtualHost *:443
    
    <VirtualHost *:443>
    DocumentRoot /NETWORKDISK/Web/WWW
    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/apache.pem
    
    <Directory />
    	Options FollowSymLinks
    	AllowOverride None
    </Directory>
    <Directory /NETWORKDISK/Web/WWW/>
    	Options Indexes FollowSymLinks MultiViews
    	AllowOverride None
    	Order allow,deny
    	allow from all
    </Directory>
    
    ServerName my.domain.com
    </VirtualHost>
    I've been trying to get it to work for hours, so any help will be greatly appreciated

    EDIT: I've found the problem - the solution is to ensure your Apache SSL virtual hosts are included in your httpd.conf file and not in a file in your sites-available directory. As soon as I moved the SSL virtual hosts to httpd.conf the error message disappeared and I was able to connect over https.
    Last edited by nquinnathome1; May 26th, 2008 at 11:08 AM. Reason: found solution

  2. #2
    Join Date
    Mar 2008
    Beans
    9

    Re: [SOLVED] Apache + SSL returns \x16\x03\x01 error

    I've found another (and more simple) solution:
    check in /etc/apache2/sites-enabled if there is a "000-default-ssl" symlink; if not (this was my problem):
    # sudo ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/000-default-ssl
    # sudo /etc/init.d/apache2 restart


    Always check this:
    (thanks: http://www.noah.org/wiki/Apache2_Inv...16%5Cx03%5Cx01)
    # telnet 192.168.0.1 443
    GET /
    If you get HTML code, then your server didn't load mod_ssl

  3. #3
    Join Date
    Jun 2007
    Location
    GA, USA
    Beans
    72
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: [SOLVED] Apache + SSL returns \x16\x03\x01 error

    Quote Originally Posted by flyingstar16 View Post
    I've found another (and more simple) solution:
    check in /etc/apache2/sites-enabled if there is a "000-default-ssl" symlink; if not (this was my problem):

    # sudo ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/000-default-ssl
    # sudo /etc/init.d/apache2 restart


    Always check this:
    (thanks: http://www.noah.org/wiki/Apache2_Inv...16%5Cx03%5Cx01)

    # telnet 192.168.0.1 443
    GET /
    If you get HTML code, then your server didn't load mod_ssl
    Wonderful! Thanks, I thought I was going to end up bald tonight!

  4. #4
    Join Date
    Apr 2007
    Beans
    18

    Re: [SOLVED] Apache + SSL returns \x16\x03\x01 error

    I know this is a little bit late in the thread, but after having the same issues and spending a few hours in different forums, the solution for me was rather a red faced moment. I'd forgotten to run a2ensite <name of ssl site>

  5. #5
    Join Date
    Oct 2010
    Beans
    2

    Re: [SOLVED] Apache + SSL returns \x16\x03\x01 error

    Thanks flyingstar16, i had a lot of problems setting up SSL, and really found nothing about that error...
    (ssl_error_rx_record_too_long)


    I looked for a solution a few days, until i found this post, and it worked!


    Thanks!

  6. #6
    Join Date
    Mar 2007
    Beans
    1
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: [SOLVED] Apache + SSL returns \x16\x03\x01 error

    Thank you, dchky. Forgetting to enable the ssl version of the site with a2ensite was my problem too!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •