users@glassfish.java.net

newbie question on setting up GlassFish with Apache front-end on port 80

From: <forums_at_java.net>
Date: Thu, 9 Feb 2012 16:02:46 -0600 (CST)

 (note: Newbie question here, so it may be something obvious)

I'm attempting to setup GlassFish 3.1.1 as a web container (similar to
Tomcat) front-ended by Apache webserver 2.2.x on a CentOS 6.2 system using
mod_jk. Everything is installed and running. I am ready to deploy an
application. 

My goal is to have all external traffic pass through Apache webserver port
80, to access GlassFish using port 8009 for AJP with mod_jk. Using [this
site's instructions][1] as inspiration, I modify httpd.conf to include:

LoadModule jk_module /etc/httpd/modules/mod_jk.so JkWorkersFile
/home/glassfish/glassfish3/glassfish/domains/domain1/config/glassfish-jk.properties
JkLogFile /etc/httpd/logs/mod_jk.log JkLogLevel debug JkLogStampFormat "[%a
%b %d %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat
-ForwardDirectories JkRequestLogFormat "%w %V %T"
as well as the following line (but inside the pre-existing VirtualHost tags
for www.mydomain.com)

JkMount /glassfish-test/* worker1
I *think* this means all traffic passing through Apache webserver that
includes the address `http://www.mydomain.com/glassfish-test/` will be
directed to/from GlassFish. 

The glassfish-jk.properties file is:

worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost
worker.worker1.port=8009 maxThreads=256
Then restart Apache webserver, and start GlassFish server.

At this point, I'm guessing what to do next. I take GlassFish's example
hello.war file, and place it in the following directory:

~/public_html/glassfish-test/
Then I issue a `jar xvf hello.war` to extract the files/directories. I then
see the following file:

~/public_html/glassfish-test/index.jsp
so I type the following address into the browser:

http://www.mydomain.com/glassfish-test/index.jsp
and the website hangs (spinning wheel forever). Since I've never done this
before, I'm looking for a sanity check if I'm doing it correctly. The
instructions I see online usually refer to setting up GlassFish with direct
access to the external world, whereas I'm trying to pass all traffic through
Apache's port 80.

 

 
 


--
[Message sent by forum member 'gkk_gf']
View Post: http://forums.java.net/node/883403