Lloyd Meinholz wrote:
> What is the recommended way to front a glassfish v2 ur2 installation
> with an apache httpd 2.2.x server? I'm on Ubuntu Linux if that matters.
>
> Is there a standard solid way to do this? I'm surprised it is so
> difficult.
>
> I've read a blog entry about using mod_jk and jars from tomcat 5.5
> that didn't sound super reliable, some things about mod_proxy_ajp and
> reverse proxy.
>
> I've tried doing it myself as a reverse proxy with mod_proxy,
> proxy_http, proxy_html etc. but never got that working (kept rewriting
> hostname as localhost).
>
> I really need to do this because I have only one server and need
> apache httpd to run my svn repository and trac and don't really want
> to run this on non-standard ports if possible. I would like to put
> glassfish behind this, but keep having to use tomcat or jboss because
> of the apache httpd connectivity issue.
>
> Thanks for any help with this,
>
> Lloyd
>
For Ubuntu:
apt-get -y update
apt-get -y install apache2
apt-get -y install libapache2-mod-proxy-html
a2enmod proxy
/etc/init.d/apache2 force-reload
a2enmod proxy_http
a2enmod proxy_html
a2enmod proxy_ajp
a2enmod proxy_balancer
/etc/init.d/apache2 force-reload
Also edit:
/etc/apache2/mods-enabled/proxy.conf
and set Deny from all TO Allow from all
(2) Copy three necessary jars from tomcat and jakarta-commons to
glassfish/lib directory
* tomcat-ajp.jar
* commons-logging.jar
* commons-modeler.jar
A related reference article can be found at:
http://blogs.sun.com/jluehe/entry/supporting_apache_loadbalancer_with_glassfish
--
Regards
Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement for Cloud Computing
http://www.ngasi.com
NEW! FREE Developer account for Hosted version on Amazon EC2