0

N00b question, sorry:

I installed Apache 2.2.17 + OpenSSL on a Windows box, and now I'm trying to configure mod_ssl, but I can't. What I did was the following:

  1. Using OpenSSL, create a certificate (C:\my\cert) and a key (C:\my\key).

  2. Uncomment the line LoadModule ssl_module modules/mod_ssl.so in the httpd.config file.

  3. Update extra\httpd.ssl.conf:

    <VirtualHost _default_:443>
    DocumentRoot "C:/my/document/root"
    # ...
    SSLEngine on
    # ...
    SSLCertificateFile "C:/my/cert"
    SSLCertificateKeyFile "C:/my/key"
    # ...
    <Location />
        SSLRequireSSL
    </Location>
    SSLOptions +StrictRequire
    

And, at this point, I am stuck. Please someone not only tell me what I have to do, but explain me why I have to do it.


The following line gets added to the errors.log file whenever I try to enter https://mysite/:

[Mon Mar 21 16:49:57 2011] [error] [client 192.168.0.14] Invalid method in request \x16\x03
isekaijin
  • 153
  • 1
  • 1
  • 6

1 Answers1

1

What you're missing is

SSLEngine on

Inside that <VirtualHost> which is what tells Apache that it needs to process incoming connections as SSL connections. Without it, Apache assumes that incoming connections are unencrypted and it tries to parse the SSL protocol as HTTP and gets gibberish.

DerfK
  • 19,493
  • 2
  • 38
  • 54