I am trying to get proxy a certain path in my domain to a different
back end than the “normal” paths. So far I have done this. I got all
this information from various sites on the web and it almost works.
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffers 32 16k;
This works except that some sort of a rewrite rule is required because
the links form that back end are broken. For example when the backend
links to /images/blah or /stylesheets/blah the browser thinks the
images and the stylesheets come from the / root.
I would like the proxy to somehow rewrite those links to be
/foo/images/blah and /foo/stylesheets/blah.
I saw this link… http://wiki.nginx.org/NginxLikeApache but that does
not work at all.
Any help would be much appreciated.
Thanks in advance.