Interesting Apache+Tomcat Conundrum

James Bucanek subscriber at gloaming.com
Sat Feb 10 23:29:38 PST 2007


Greetings,

Running OS X Server 10.3 on an Xserve.

I'm trying to set up some discussion forums for an existing web site. The forum software and site use JSP running Tomcat. So far, so good.

I'm trying to get the forum software to run in its own domain as though it was its own web site: i.e. http://forums.domain.net/

My problem is ports. Tomcat is running on port 9006. Virutal hosts in OS X run on port 16080 (why, I don't know). If I try to implement this using just ProxyPass it doesn't work because it simply changes the URL to http://jsp.domain.net:9006/, which is ugly.

I tried to do this by simply mapping all requests to Tomcat via 'JKMount /*', but this doesn't help because redirects generated by the webapp go to http://forums.domain.net:16080/ because that's the port the servlet thinks it is running on. The redirected request times out because port 16080 isn't accessible from the outside world.

I tried adding ProxyPassReverse directives, but they apparently don't rewrite redirects.

So either I end up with ugly URLs with port numbers in them, or the client gets back URLs that die trying to send to port 16080.

Does anyone know a way out of this?

-- 
James Bucanek


More information about the MacOSX-admin mailing list