upsteam + proxy_redirect ??
torajx
nginx-forum at nginx.us
Sun Jun 12 01:21:41 MSD 2011
Hi,
here is part of nginx.conf ; in some condition mysite1.com redirect
users
to some of its url so i need to use proxy_redirect in my locations;
now i want to start using upstream to add load balancing to my site;
the location v1 is working fine with my main site but when i want to
change its setting to something like location v2 it does not work and
redirect browser to mysite1.com and users can see the real site behind
the mynginxserver.com
can i use proxy_redirect when i use upstream ??
users type myngixxserver.com in their browser;
images stores on mysite2.com;
i will add more server to my upstream when the problem solves;
sorry for my bad english
mystic and mysite2 ip addresses are invalid
if more info is needed plaza tel me
thank you in advance;
---------------------------------------
upstream mysites {
server www.mysite1.com;
}
upstream myimages {
server image.mysite1.com;
}
location /v1 {
proxy_pass http://www.mysite1.com;
proxy_redirect http://www.mysite1.com/v1
http://www.mynginxserver.com/v1
}
location /v2 {
proxy_pass http://mysites/v2;
proxy_redirect http://www.mysite1.com
http://www.mynginxserver.com/v2;
}
location /images {
proxy_pass http://www.mysite2.com/images;
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,206003,206003#msg-206003
More information about the nginx
mailing list