Proxy passing and the URI

mike mike503 at
Tue Sep 23 09:31:02 MSD 2008

I have a request for

I have this location block inside of server{} with root /home/foo/web/

location ^~ /sites {
   proxy_set_header Host;

Trying to pass it to a second server.

The problem is, the second server receives this as the full URI; I
have to define "root" to be the base URI (/home/foo/web/ so
the /sites/something maps to it properly. Is there any way to remove
parts of the URI when passing via proxy? So the /sites/something/
isn't needed on the upstream server?


More information about the nginx mailing list