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 configured my VirtualHost to proxy all requests to a Tomcat server

ProxyPass / http://localhost:8088/app
ProxyPassReverse / http://localhost:8088/app

This works fine for URLs like, but for and I get this redirection response, which obviously leads to nothing.

HTTP/1.1 302 Moved Temporarily
Date: Wed, 06 Jul 2011 21:13:37 GMT
Server: Apache-Coyote/1.1             <-- the redirect comes from tomcat
Location:     <-- nonsense

What can I do to fix it? Preferably in the Apache config.

I'm using Apache 2 and Tomcat 7

share|improve this question
up vote 7 down vote accepted

I'm not exactly sure why, but this is the fix

ProxyPass / http://localhost:8088/app/
ProxyPassReverse / http://localhost:8088/app/

(Added slashes to the end)

share|improve this answer
Slashes should always match. From the mod_proxy documentation: If the first argument ends with a trailing /, the second argument should also end with a trailing / and vice versa. Otherwise the resulting requests to the backend may miss some needed slashes and do not deliver the expected results. – Shane Madden Jul 6 '11 at 21:43

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.