supeng
1
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!
Posted at Nginx Forum:
supeng
2
My environment:
OS: Windows 7
Nginx Version: nginx/Windows-0.8.24
Tomcat Version: apache-tomcat-6.0.18
Posted at Nginx Forum:
supeng
3
Hello!
On Sat, Nov 14, 2009 at 10:16:36AM -0500, supeng wrote:
}
}
… …
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!
http://wiki.nginx.org/NginxHttpProxyModule#proxy_redirect
http://wiki.nginx.org/NginxHttpCoreModule#server_name_in_redirect
In your case proxy_redirect default should be ok as long as you
set correct server_name, i.e.
server_name mydomain;
or use
server_name_in_redirect off;
Maxim D.