2 Replies Latest reply on Nov 13, 2009 11:45 AM by pferraro

    Using HTTP/HTTPS instead of AJP

    dbschofield

      Given the requirement to use SSL between an Apache HTTP server and JBoss AS 5.1, how do you configure mod_cluster to use HTTP/HTTPS instead of AJP?

      I have installed the appropriate mod_proxy_http.so module.

      #load mod_cluster modules
      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 slotmem_module modules/mod_slotmem.so
      LoadModule manager_module modules/mod_manager.so
      LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
      LoadModule advertise_module modules/mod_advertise.so


      The http server and JBoss are communicating fine and mod_cluster-manager shows:

      Node standard (ajp://127.0.0.1:8009):
      Enable Contexts Disable Contexts
      Balancer: mycluster,Domain: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 76,Ttl: 60000000,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 94
      Virtual Host 1:
      Contexts:
      
      /jmx-console, Status: ENABLED Disable
      
      Aliases:
      
      localhost


      You can see the URL to my "standard" node is using the AJP protocol which I don't want. This of course fails without the mod_proxy_ajp.so module installed. What is the configuration to change this to HTTP or HTTPS?


        • 1. Re: Using HTTP/HTTPS instead of AJP
          dbschofield

          Think I have partially solved my own problem. I removed the ajp connector from the server.xml so http is the only option and mod_cluster began using http.

          Eventually I need to have both the http and https connectors running. How does the mod_cluster JBoss service decide which protocol to broadcast to the http proxy?

          • 2. Re: Using HTTP/HTTPS instead of AJP
            pferraro

            If an AJP connector, or connector using a reverse connection exists, mod_cluster will prefer it. Otherwise, mod_cluster chooses the connector with the highest value for maxThreads.