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 http://mydomain.com/tomcat/some/extra/stuff proxy from This is what I'm trying so far:

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

This results in http://mydomain.com/tomcat/meow/cat redirecting to http://mydomain.com/meow/cat which is not what I want. Any ideas?


You don't need the rewrite rule, that config will map domain.com/tomcat/ to so you don't need to rewrite the directory


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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