GlassFish Configuration
asadmin create-network-listener --listenerport 8009 --protocol http-listener-1 --jkenabled true jk-connector Note : the above works with 3.1.2. The trunk needs a jk-enabled http instead of network-listener. This will be supported in the future Grizzly version. <protocol name="jk-connector"> <http default-virtual-server="server" jk-enabled="true"> </http> </protocol> <network-listener port="8009" protocol="jk-connector" transport="tcp" name="jk-connector" thread-pool="http-thread-pool"></network-listener> Apache Configuration
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so Include conf/other/*.conf ProxyRequests Off Order deny,allow Deny from all Allow from localhost ProxyPass / ajp://localhost:8009/ ProxyPassReverse / ajp://localhost:8009/ Now any http://localhost:80 request will direct to GlassFish If you need only redirect certain webapp (ex. hello), you can modify ajp.config ProxyRequests Off Order deny,allow Deny from all Allow from localhost ProxyPass /hello ajp://localhost:8009/hello ProxyPassReverse /hello ajp://localhost:8009/hello |