Interesting Apache+Tomcat Conundrum
Michael Bentley
rmcore at gmail.com
Sun Feb 11 09:21:41 PST 2007
On Feb 11, 2007, at 1:29 AM, James Bucanek wrote:
> 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?
You can use a new IP address for your forums site (I think). Try this:
- go to System Preferences > Network
- select Network Port Configurations from the 'Show:' popup
- click New
- Choose Built-in Ethernet from the 'Port:' popup
- Choose your new alias ethernet port from the 'Show:' popup
- configure the port
- configure your forum server to listen on the new port
If you don't want to use System Preferences, you can create an alias
with /sbin/ifconfig -- but the next time you reboot, you'll lose the
alias unless you create a StartupItems script for it ( http://
docs.info.apple.com/article.html?artnum=106418 ).
At any rate, once you have your second IP address working, get it set
up in DNS and your troubles may be over ;-)
hth,
Michael
More information about the MacOSX-admin
mailing list