Skip to main content

Fronting GlassFish v3 with Apache httpd

Posted by jfarcand on August 27, 2008 at 2:50 PM PDT

This blog has moved here

Related Topics >>

Comments

This isn't very clear to someone who is trying to do this for the first time. Am I suppose to add the one property line to an existing http-listener? My guess was to copy the entire snippet of code. However, that didn't work. I tried adding a closing </http-listener> but that didn't work either. Did some of the HTML get eaten in your post?

Take a look at the following link: http://blogs.sun.com/jluehe/entry/supporting_apache_loadbalancer_with_gl... Thanks!

useful,then how it could be if I used the cluster by AHS on GFv3?

Hi, great to have this now in Version 3 ! Did you also test, if it's working fine with apache 2.2 + mod_proxy_ajp module instead of apache + mod_jk ? http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html

You can setup 2 jk-listener by just changing the port number. Can you elaborate on the security key? Thanks.

Looks like some kind of abuse of the id attribute. Can I set up two JK listeners? What about security key?

There are some typos in that config here is what you want to add <http-listener default-virtual-server="server" family="inet" security-enabled="false" enabled="true" server-name="" address="0.0.0.0" acceptor-threads="1" port="8009" id="jk-connector" xpowered-by="true" blocking-enabled="false" > <property name="jkEnabled" value="true"/> </http-listener> That goes inside the tag http-service tag... Also I had to change this line <virtual-server id="server" http-listeners="http-listener-1,http-listener-2"> -- to this -- <virtual-server id="server" http-listeners="jk-connector,http-listener-1,http-listener-2"> I used mod_proxy_ajp on the server side since that is easier to configure IMO and does everything I need to well enough. Here is the apache side vhost config for having glassfish.bob.com served by glassfish. Obviously you need mod_proxy_ajp loaded for this to work google is your friend on that one. NameVirtualHost *:80 <VirtualHost *:80> ServerName glassfish.bob.com ProxyPass / ajp://localhost:8009/ </VirtualHost>

Yes, just do: %asadmin create-jvm-options -Dcom.sun.enterprise.web.connector.enableJK=8009

What would be the syntax to create an AJP listener in the new format of the config file in glassfish v3? The structure has changed quite a bit. Is it supported?