Apache forwarding to tomcat shows a blank page
Posted
by
MNS
on Server Fault
See other posts from Server Fault
or by MNS
Published on 2012-04-13T10:00:36Z
Indexed on
2012/04/13
11:32 UTC
Read the original article
Hit count: 217
I have an application running on tomcat at http ://www.example.com:9090/mycontext. The host name in server.xml points to www .example.com. I do not have localhost anymore. I am using apache to forward requests to tomcat using mod_proxy. Things work fine as long as the ProxyPath is /mycontext. The server name setup in virtual host is www .abc.com and http ://www.abc.com/mycontext works fine. However I would like to ignore the context path and simply use http://www.abc.com/ to forward requests to http://www.example.com:9090/mycontext. When I do this, apache shows me a blank page. What am I missing here? I have not changed anything in server.xml except the default host to www .example.com.
<VirtualHost *:80>
ServerName www.abc.com
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://www.example.com:9090/mycontext
ProxyPassReverse / http://www.example.com:9090/mycontext
</VirtualHost>
Thanks
© Server Fault or respective owner