| From | Sent On | Attachments |
|---|---|---|
| supeng | Nov 14, 2009 7:16 am | |
| supeng | Nov 14, 2009 7:25 am | |
| Maxim Dounin | Nov 14, 2009 8:53 am | |
| supeng | Nov 14, 2009 6:47 pm |
| Subject: | Re: proxy_pass bug | |
|---|---|---|
| From: | Maxim Dounin (mdou...@mdounin.ru) | |
| Date: | Nov 14, 2009 8:53:55 am | |
| List: | ru.sysoev.nginx | |
Hello!
On Sat, Nov 14, 2009 at 10:16:36AM -0500, supeng wrote:
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!
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 Dounin





