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

Unfortunately, my work requires me to use Apache Tomcat. The Tomcat application is running on I'd like to get a reverse proxy going so I can have proxy from This is what I'm trying so far:

location /tomcat {
    rewrite ^/tomcat(/.*) $1 break;

This results in redirecting to which is not what I want. Any ideas?

share|improve this question

You don't need the rewrite rule, that config will map to so you don't need to rewrite the directory

share|improve this answer
I want to be accessed by mypublicip/tomcat/whatever rather than mypublicip/whatever – Corey Farwell May 27 '11 at 5:00
Yes, that will work fine, you don't need rewrite rules. Anything with a sub-directory of /tomcat will be proxied. site/tomcat/folder/file.html will map to 127[...]/folder/file.html – Smudge May 27 '11 at 5:34

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.