Hello!
On Tue, Jun 14, 2011 at 06:03:52AM -0400, torajx wrote:
> thank you, i will try; but what is different between v1 and v2 ;
> i just use upstream in v2 and server in upstream is the same as v1
> server;
The difference is upstream name: in v1 you use your domain (the
same as in proxy_redirect), while in v2 you use upstream{} block
name. Upstream name is used in Host header in request to upstream
by default[1], and this may (and likely will) cause your backend
to return different redirects.
BTW, proxy_redirect default will use upstream name as well, and
this should handle such situations transparently. See [2] for
details.
[1] http://wiki.nginx.org/HttpProxyModule#proxy_set_header
[2] http://wiki.nginx.org/HttpProxyModule#proxy_redirect
Maxim Dounin
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx