2 Replies Latest reply on Aug 10, 2010 11:51 AM by dbschofield

    ProxyPreserveHost required?

    dbschofield

      When a JBoss instance fronted by mod_cluster/apache performs a redirect it sends the host:port of the JBoss instance in the redirect instead of the host:port of the apache instance which is what the client browser sends in the first place.  This causes the application to break if there is no network route from the browser to the JBoss instance and effectively removes apache as a frontend proxy/load balancer.  Setting "ProxyPreserveHost On" in the apache config so far has resolved this.  Is "ProxyPreserveHost On" required by mod_cluster to function properly when redirects are involved or is there some other config that I am missing?

        • 1. Re: ProxyPreserveHost required?
          jfclere

          It could be done in the <Connector/> via the proxyName (and proxyPort).

          AJP should send the correct hostname and port to JBoss.

          • 2. Re: ProxyPreserveHost required?
            dbschofield

            Jean-Frederic thanks for your response.  I have added a little more detail for my particular scenario in regards to your comment and would like your feedback as I am to the point I think a feature request needs to be opened on this.

            It could be done in the <Connector/> via the proxyName (and proxyPort).

            The proxyName and proxyPort should work but then ties my JBoss configuration to the virtual host name of the Apache instance fronting it.  This is something I am hoping to avoid in order to keep the JBoss server config portable across different environments where different virtual hosts are used.

            AJP should send the correct hostname and port to JBoss.

            Honestly I haven't tried AJP.  I have requirements to use SSL between Apache and JBoss.  The last I checked AJP only forwards the SSL headers and does not negotiate a SSL handshake to encrypt the data over the wire.  Please correct me if I am wrong on this.

             

            I'm thinking that ProxyPreserveHost could be either:

            1. Added to the mod-cluster documentation when HTTP/HTTPS is used between Apache and JBoss.
            2. Set this property in the mod-cluster apache module so HTTP/HTTPS behave like AJP out of the box.
            3. Set as an equivalent property in mod-cluster-jboss-beans.xml and have it dynamically updated in Apache.

             

            Thoughts/comments?