3 Replies Latest reply on Feb 12, 2014 8:28 PM by evapizana

    Cannot load mod_ssl.so (Syntax error)

    montia Newbie



      I downloaded mod_cluster-1.2.0.Final-windows-x64-ssl.zip from http://www.jboss.org/mod_cluster/downloads/1-2-0-Final. I extracted all contents to C:\httpd-2.2 on my 64-bit Windows Server 2008 R2 Standard machine.


      I followed the 2.2.4. Install in Windows instructions in the mod_cluster Documentation:



      When I uncomment the following line in httpd.conf I get the syntax error message included below:

      LoadModule ssl_module modules/mod_ssl.so


      httpd: Syntax error on line 113 of C:/httpd-2.2/conf/httpd.conf: Cannot load C:/httpd-2.2/modules/mod_ssl.so into server: The specified module could not be found.


      Does mod_ssl.so depend on any other modules? Is there something else I need to configure in httpd.conf to be able to load this module?


      Do I need to set up OpenSSL?

      I chose to use keytool to generate a self-signed server.keystore file due to my familiarity with this process and with enabling SSL on previous versions of JBoss, but I noticed the following line in the Apache mod_ssl documentation and I don't really understand what it means or what steps I need to go through to get this set up:


      "This module relies on OpenSSL to provide the cryptography engine."



      Some background on what I am trying to achieve with my setup:


      1.  I have Apache HTTP configured so that requests on port 80 for two name-based virtual hosts (http://site1.com and http://site2.com) go to a web application running on JBoss AS 7.1.1.Final on port 8080.


      2.  I have also created a self-signed server.keystore file using keytool and enabled SSL in JBoss so now I can access my web application locally by going to https://localhost:8443/myapp.


      I want to have requests for https://site1.com and https://site2.com on port 443 go to my JBoss application on port 8443.


      I am running Apache HTTP and JBoss AS 7.1.1 on the same system, so I don't need to secure the connection between the two. Only between the browser and Apache HTTP.


      I am using Java SE Development Kit 6 Update 32 (downloaded jdk-6u32-windows-i586.exe from http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u32-downloads-1594644.html). I have also downloaded jboss-native-2.0.10-windows-x64-ssl.zip from http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-10.html and configured it so that I can run JBoss as a service.


      Thank you,


        • 1. Re: Cannot load mod_ssl.so (Syntax error)
          montia Newbie

          More than two weeks have passed and I was finally able to find a solution to the issue above, but first things first:


          I also tried using the 32-bit version of mod_cluster (downloaded mod_cluster-1.2.0.Final-windows-x86-ssl.zip from http://www.jboss.org/mod_cluster/downloads/1-2-0-Final), thinking that perhaps this issue was caused by an incompatibility with my current setup on a 64-bit Windows system. However, I got the same Syntax error message when I uncommented the following line from the httpd.conf file that was included in mod_cluster-1.2.0.Final-windows-x86-ssl.zip:


          LoadModule ssl_module modules/mod_ssl.so

          Given the solution I will be describing below, the only conclusion I can reach is that there is something wrong with the mod_ssl.so module supplied in both mod_cluster windows binary packages.

          Perhaps the mod_ssl.so was not correctly compiled or is not the correct file for a Windows distribution. Too bad that, judging by the overwhelming feedback to my original post, nobody seems to care about it. I'm hoping that the solution below will help somebody in the future.



          1.  Downloaded httpd-2.2.22-win32-x86-openssl-0.9.8t.msi from http://apache.mirror.rafal.ca/httpd/binaries/win32/.


          2.  Double-clicked on the file and entered the following information when prompted:

          Network Domain

          Server Name

          Server Admin


          3.  Chose to install:

          for All Users, on Port 80, as a Service (Recommended)


          4.  Setup Type: Custom


          5.  Build Headers and Libraries

          - chose ‘This feature will be installed on local hard drive.’

          - left everything else the same


          6.  Default path: C:\Program Files (x86)\Apache Software Foundation\Apache2.2


          7.  I started the Apache HTTP Server as a service and it started up fine.


          8.  I stopped the service, uncommented LoadModule ssl_module modules/mod_ssl.so in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf and ran httpd.exe from the Command Prompt with the -t flag. There were no errors. I started the Apache HTTP Server service and it ran fine.


          9.  To be able to use mod_cluster, I copied the following files from mod_cluster-1.2.0.Final-windows-x86-ssl.zip\httpd-2.2\modules to C:\Program Files (x86)\Apache Software Foundation\Apache2.2\modules:





          10.  I also copied the following section from my previous httpd.conf file to the new C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf\httpd.conf file:

          LoadModule proxy_module modules/mod_proxy.so
          LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
          LoadModule proxy_http_module modules/mod_proxy_http.so


          LoadModule proxy_cluster_module modules/mod_proxy_cluster.so


          LoadModule manager_module modules/mod_manager.so
          LoadModule slotmem_module modules/mod_slotmem.so
          LoadModule advertise_module modules/mod_advertise.so


          # MOD_CLUSTER_ADDS
          # Adjust to you hostname and subnet.
          <IfModule manager_module>
            Listen IP_ADDRESS:6666
            ManagerBalancerName mycluster
            <VirtualHost IP_ADDRESS:6666
              <Location />
               Order deny,allow
               Deny from all
               Allow from IP_ADDRESS


              KeepAliveTimeout 300
              MaxKeepAliveRequests 0
              #ServerAdvertise on http://IP_ADDRESS:6666
              AdvertiseFrequency 5
              #AdvertiseSecurityKey secret
              #AdvertiseGroup IP_ADDRESS:23364


              <Location /mod_cluster_manager>
                 SetHandler mod_cluster-manager
                 Order deny,allow
                 Deny from all
                 Allow from IP_ADDRESS




          11. To answer my question regarding OpenSSL in my original post:

          Yes, I ended up using OpenSSL to generate a self-signed certificate, but since OpenSSL came bundled with the Apache HTTP Server, I did not need to download or install any additional files. The PDF document available at the following link was a great resource on how to install and configure Apache 2.2 with SSL on Windows: