users@glassfish.java.net

Glassfish app on apache vhost not working. Not sure where I went wrong.

From: <glassfish_at_javadesktop.org>
Date: Tue, 23 Sep 2008 08:21:32 PDT

I've been hacking at this for 2 days now. I followed the docs at Sun for setting up mod_jk, and also checked the info at Jean-Francois' blog.

I'm using the Coolstack 1.3 apache (2.2.8). Mod_jk is installed. Tomcat jars are installed, although I had to use commons-logging-1.1 since 1.0.4 caused a lot of problems for my application (Roller blogging app).

I'm not sure what I'm missing in my vhost config. The jk and workers config are the same as the docs mention. I have the necessary piece added to glassfish and it is listening on 8009.

My application is deployed in the default manner. It is running on 8080 at the context root /roller. So I can get to it by going to my.domain.com:8080/roller.

In my vhost config for apache I have the following:

<VirtualHost roller.my.domain:80>
  ServerName roller.my.domain
  DocumentRoot "/opt/SUNWappserver/domains/smfdomain/applications/j2ee-modules/roller-weblogger/"
  DirectoryIndex index.jsp
 
  JkMount /*.jsp worker1
  JkMount /roller/* worker1

 </VirtualHost>

I've tried with and without the doc root. Without it, the vhost resolves to the default site. With it, I get a 403, forbidden error.

I've also tried:

<IfModule proxy_module>
<IfModule proxy_ajp_module>
  <Location />
    ProxyPass ajp://localhost:8009/roller/
    ProxyPassReverse ajp://localhost:8009/roller/
  </Location>
</IfModule>
</IfModule>

This gives me errors such as :
ajp_read_header: ajp_ilink_receive failed

I have no idea what I'm doing wrong. I seem to have the same configuration that is in all the examples I've seen, but I cannot get my application to resolve via apache.
[Message sent by forum member 'tsmori' (tsmori)]

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