users@glassfish.java.net

Re: docroot of web app / mod_jk

From: <glassfish_at_javadesktop.org>
Date: Mon, 08 Jun 2009 02:10:17 PDT

Hi,

>yes, I use mod_jk, but I am not very happy with that as the port 8009 is even open to outside if you do not have a proper firewall in place.

That's the default configuration, which is a pain really by default it should only listen on localhost.

Anyway, you can change that by doing the following (courtesy of Amy Roh):-

Create a glassfish-jk.properties file

Let GlassFish know where you'd like to load glassfish-jk.properties from by adding :

$GLASSFISH_HOME/bin/asadmin create-jvm-options -Dcom.sun.enterprise.web.connector.enableJK.propertyFile=$GLASSFISH_HOME/domains/domain1/config/glassfish-jk.properties

In the glassfish-jk.properties files you need to have the following:-

address=127.0.0.1

That will ensure that glassfish listens on 127.0.0.1:8009 for mod_jk.

Regards.
[Message sent by forum member 'arshadm' (arshadm)]

http://forums.java.net/jive/thread.jspa?messageID=349689