10.28.2007

glassfish ajp proxy

another post from the old blog that i didn't want to lose:

Jean-Francois Arcand wrote an excellent blog entry on getting an ajp proxy running with glassfish. the only problem was that it used mod_jk. now, that's great for httpd pre-2.2, but as of version 2.2 there is a much better way. mod_proxy_ajp allows you to proxy with ajp the same way you would with any other protocol. consequently, all of the worker.properties stuff can be replaced by apache configuration directives like:

<IfModule proxy_module>
<IfModule proxy_ajp_module>
  <Location /pebble>
    ProxyPass ajp://127.0.0.1:8009/pebble
  </Location>
</IfModule>
</IfModule>

comments

martyn
Hi
While configuring with the proxy_ajp this seems to forward all request to glassfish is there a way to configure it so it works like the mod_jk that you can specify file extentions that should be forwarded and let apache handle the html,jpegs,gif of the sort .
I have been going through the documentation but don't see any thing that does this. I would be greatfull for any pointers on this.
regards martyn.
me
hey, sorry for the very, very slow reply. you're right in that the example i gave forwards everything. and while i'm not expert on apache or proxies, i can say that mod_proxy is pretty versatile. i'm pretty sure that you could accomplish what you're trying to do with the ProxyMatch directive. another way to go might be to take a look at mod_cache. it would probably boost the performance of your static content in a more dynamic way. hope that helps.
anonymous
I think you also need a ProxyPassReverse, in case the glassfish side sends an HTTP redirect.

I'm not totally sure, but that is what I have read.  :-)

2 comments:

Anonymous said...

hi , i found something that might help u here:
http://smirkingdog.com/blog/?p=3

Mara Hurst said...

Hello mate nice bblog