8 messages in ru.sysoev.nginxRe: Proxy passing and the URI
FromSent OnAttachments
mikeSep 22, 2008 10:30 pm 
Maxim DouninSep 23, 2008 1:51 am 
mikeSep 23, 2008 7:08 am 
ResicowSep 23, 2008 9:48 am 
Igor SysoevSep 23, 2008 10:05 am 
ResicowSep 23, 2008 10:49 am 
Igor SysoevSep 23, 2008 10:59 am 
ResicowSep 23, 2008 4:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Proxy passing and the URIActions...
From:mike (mike@gmail.com)
Date:Sep 23, 2008 7:08:26 am
List:ru.sysoev.nginx

On Tue, Sep 23, 2008 at 1:52 AM, Maxim Dounin <mdou@mdounin.ru> wrote:

location ^~ /sites { proxy_pass http://10.122.47.82/; }

the '/sites' part will be removed.

Weird, so that missing "/" at the end would have fixed my issue? I -think- on a quick check it has. I thought I tried that earlier and it didn't help!

See http://wiki.codemongers.com/NginxHttpProxyModule#proxy_pass for details.

2. Modify uri as needed with rewrite before proxy_pass. This less efficient but may be used where 1 can't be (e.g. in regex locations). E.g.

location ~ ^/sites.*\.cgi$ { rewrite ^/sites(.*) $1 break; proxy_pass http://backend; }

Yeah, I've tried this before too, executing rewrites before the location block and such. I can't really do it here - I could do it -inside- of the location block however, if needed. This current host supports a ton of other rewrites and it could get confusing and/or break something if I did any more rewrites outside of the location block!

Thanks Maxim!