nginx and cscart
Reinis Rozitis
r at roze.lv
Mon Jun 27 13:08:45 MSD 2011
Think of nginx as a transparent proxy/frontend - so instead of giving
proxy_set_header Host 192.168.1.1; you should set the real hostname of the
site proxy_set_header Host yoursite.com; (you can also use $host variable if
there are multiple/dynamic domains).
upstream mysites_hash {
ip_hash;
server 192.168.1.1;
server 192.168.1.2;
}
location /csupdate {
proxy_pass http://mysites_hash/csupdate;
proxy_set_header Host www.mydomain.com;
}
That way the backends/application should use full domain (the one you pass
in the header) in the redirects which will go through your nginx frontend
without the need of extra proxy_redirect directives.
rr
More information about the nginx
mailing list