I have a lot of services attached to a single domain, so I was hoping to serve Tomcat under, say, http://server_name/tomcat, with Nginx as a reverse proxy to Tomcat's HTTP connector.
The Nginx configuration is as simple as it gets:
location /tomcat {
include proxy_pass.conf;
proxy_pass http://127.0.0.1:8080;
}
If I leave it as it is, Tomcat is unable to resolve requests that begin with /tomcat, but if I otherwise set alias /; in Nginx, then Tomcat works just fine, but unfortunately it can't resolve the path under which it is being served, so all of the URLs are missing /tomcat.
I've went through the configuration reference for Tomcat 7 several times over, but I couldn't find anything that would allow me to configure Tomcat to serve all the applications under the /tomcat path, or otherwise add it as a prefix to the context path for every application.
I could manually configure server.xml with a <context/> container for every single app, but that'd just make me feel uneasy. Could anyone please tell me what is it that I'm obviously missing?