Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application running on tomcat at The host name in server.xml points to 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 and works fine. However I would like to ignore the context path and simply use to forward requests to 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

<VirtualHost *:80>

 ProxyRequests Off
 ProxyPreserveHost On

 <Proxy *>
 Order deny,allow
 Allow from all

 ProxyPass /
 ProxyPassReverse /


share|improve this question
Can you add the relevant bits of your httpd.conf file to the question? – meulop Apr 13 '12 at 10:06
I have added the virtual host settings. Is there anything else I should add? – user10211 Apr 13 '12 at 10:39

Matching trailing slashes are important in mod_proxy.

ProxyPass /

This will take a request to and proxy it to - not terribly helpful!

Try this configuration, instead:

ProxyPass /
ProxyPassReverse /

Also - if Tomcat's expecting as a host header, then you probably do not want that ProxyPreserveHost On directive.

share|improve this answer
Thanks a lot for your help. The solution partially worked. With the trailing slash added, a page should be shown when http :// is requested which corresponds to http :// Instead it goes to the "It works" page. For other URLs such as http :// it does take me to http :// How do I solve the first bit? – user10211 Apr 14 '12 at 10:13
Is it Apache's "It works" page, or Tomcat's? – Shane Madden Apr 14 '12 at 18:40
It is Apache's "It works page." – user10211 Apr 15 '12 at 4:44
Interesting... are you sure the request to / has the correct host header to get mapped to this virtual host? – Shane Madden Apr 16 '12 at 1:49
I checked the apache access log. It shows that a request made to / gets directed to /mycontext/. Should it explicitly show – user10211 Apr 16 '12 at 12:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.