I have a tomcat server bind localhost:8080, and my nginx 0.8.24's conf is
======================================
... ...
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://localhost:8080;
}
}
... ...
======================================
when I access http://mydomain/docs, the url will be redirected to http://localhost/docs. Of course, the url, http://mydomain/docs/ , is working correctly!