Menu

SSL with Webserv

Help
2004-08-01
2004-08-03
  • Nobody/Anonymous

    I'm running Webserv on Windows 2003 Server. I am neither a newbie to Wamp / Lamp setups and have manually setup SSL on a Windows pc about 2 years ago.

    Currently, I have enabled the SSL module in httpd.conf

    The 2 important sections are:

    <IfDefine SSL>
      LoadModule ssl_module modules/mod_ssl.so
    </IfDefine>

    <IfModule mod_ssl.c>
      Include conf/ssl.conf
    </IfModule>

    I have generated a key. I don't understand why it says mod_ssl.c but I have changed it to mod_ssl.so and it made no difference.

    I also created the log files that are specified in ssl.conf but I figured it wasn't that because it just doesn't even seem to be SEEING the ssl.conf file.

    I am getting no logs in eventviewer or errors.log for Apache.

    In ssl-default.conf the following is noted:

    # Note: This must come before the <IfDefine SSL> container to support
    #       starting without SSL on platforms with no /dev/random equivalent
    #       but a statically compiled-in mod_ssl.
    #
    SSLRandomSeed startup builtin
    SSLRandomSeed connect builtin

    I have tried to add the above two lines into the beginning of my ssl.conf without any further luck.

    Furthermore, there is a service that runs called "HTTP SSL" I thought it was a part of Webserv install but upon reading the description, It seems it is a default Windows service.

    This is where I got up to last night.. I have now got it working this morning. This has probably taken me about 3-4 hours to get working. Next post is the basis of what I have changed

     
    • Nobody/Anonymous

      My current setup which works.

      In httpd.conf, change:

      <IfDefine SSL>
      LoadModule ssl_module modules/mod_ssl.so
      </IfDefine>

      to

      LoadModule ssl_module modules/mod_ssl.so

      Otherwise the module doesn't get loaded. You cna check this by changing the line "LogLevel info" to "LogLevel debug" in your httpd.conf and reading the output in c:\Webserv\logs\httpd\error.log

      This is helpful to have set while trying to setup up SSL to work.

      Next, go to ssl.conf and remove the top and bottom lines eg:

      <IfDefine SSL>
      </IfDefine>

      For some reason, the <Ifdefine SSL> wasn't working for me.

      In my previous post, I mentioned Windows 2003 Server has a service called "HTTP SSL" Note that this DOES NOT have to be running and I think actually, if it IS running, it blocks Apache's ability to bind to port 443.

      Don't forget to run through your SSL Cert setup

      Start->Programs->Webserv->Apache2->SSL Cert

      to generate your certificate.

      ok, so it shouldn't have taken me 3 hours to work out that I only need to remove 4 lines from 2 different files.. but sometimes that's how things work.

      Hope this saves someone else the frustration.

      Also, to help test if your SSL is working, go to

      C:\WebServ\apache2\bin>

      and run the command

      openssl s_client -connect localhost:443 -state -debug

      The other thing is once you have it all working, remember to turn off 'debug' in your error logging. This managed to slow my https pages severely while my machine was writing to disk. Switching it back to info sped it backup to normal.

       
    • Mike Dessaint

      Mike Dessaint - 2004-08-03

      When WebServ is install it sets up the Apache service with ssl "apache.exe -D SSL -k install", thats why
      <IfDefine SSL>
      LoadModule ssl_module modules/mod_ssl.so
      </IfDefine>
      is like it is.

      <IfDefine SSL>
      </IfDefine>
      in the ssl.conf works just fine, in this configuration.

      What you did works fine, if your going to continue to run SSL

      sounds like you might be having a conflict with Win2k3 ...

      thanks for the feed back

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.