I'm trying to deploy an web application on tomcat server fronted with Nginx. The problem I encounter is tag in my jsp pages is printing out "incorrect" (it is correct from tomcat point of view) context path.
My Web app on tomcat is deployed on context path: /webApp1 with tomcat running on port 8080. So the web application is accessible via http://localhost:8080/webApp1
My nginx is configured to proxy_pass as follows:
location / {
http://localhost:8080/webApp1;
}
With this configuration, the web app is supposed to work with url http://localhost
This only works for the home page text. The home page loaded successfully but all the links on home page have /webApp1 prefixed as tomcat think that it is running by itself hence the output the contextpath as prefix for all links.
Has anyone fixed this before.
All answers are much appreciated.
z.