Search |
||
Fronting GlassFish v3 with Apache httpdPosted by jfarcand on August 27, 2008 at 2:50 PM PDT
GlassFish v2 supported Apache httpd for a while...but when we started GlassFish v3, we dropped such support to focus on things like modularity, performance, a monster called Grizzly, etc. Hence previous version of v3 couldn't be used with Apache via Tomcat's mod_jk....that's no longer the case. Better, we have simplified the way to do it. You no longer needs special jars file from Tomcat. Apache support is now fully included inside our distribution, which makes it quite simple to enable. Much simpler that what I've described here. Want to try it? Download GlassFish v3 (wait for tomorrow nightly as I enabled support today) and just edit: That's it. Notice the port number. That's the one you need to add to your /etc/apache2/worker.properties file. Haaaa!Much simpler than for GlassFish v2! The implementation is new so feel free to post your comments on the users@glassfish.dev.java.net alias in case you want...more! »
Related Topics >>
Glassfish Comments
Comments are listed in date ascending order (oldest first)
Submitted by pascalpt on Wed, 2009-06-17 16:16.
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?
Submitted by jfarcand on Wed, 2009-06-17 19:19.
Yes, just do:
%asadmin create-jvm-options -Dcom.sun.enterprise.web.connector.enableJK=8009
Submitted by glen33 on Wed, 2009-05-20 16:35.
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>
Submitted by ecki on Fri, 2008-08-29 15:31.
Looks like some kind of abuse of the id attribute. Can I set up two JK listeners? What about security key?
Submitted by jfarcand on Tue, 2008-09-02 13:30.
You can setup 2 jk-listener by just changing the port number. Can you elaborate on the security key? Thanks.
Submitted by thorleif on Mon, 2008-09-15 12:16.
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
Submitted by dingis on Wed, 2008-11-19 06:06.
useful,then how it could be if I used the cluster by AHS on GFv3?
Submitted by jfarcand on Fri, 2008-11-21 13:20.
Take a look at the following link: http://blogs.sun.com/jluehe/entry/supporting_apache_loadbalancer_with_gl... Thanks!
Submitted by mmellinger66 on Mon, 2008-12-08 14:20.
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?
|
||
|
|