1 message in ru.sysoev.nginxRewrites vs. location, etc.
FromSent OnAttachments
mikeSep 22, 2008 11:06 am 
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:Rewrites vs. location, etc.Actions...
From:mike (mike@gmail.com)
Date:Sep 22, 2008 11:06:58 am
List:ru.sysoev.nginx

From what it appears,

rewrite foo bar last;

Gets processed before any location blocks.

i.e. a request for

/foo/bar

with a rewrite of rewrite ^/foo/(.*) /$1 last;

will wind up making it /bar, so the location needs to be

location /bar { }

Correct?

I am having issues with an app that needs a bunch of rewrites, some pretty generic, and intercepting the request for just one URI path and passing it on to either a location block that has its own root/etc/etc, or I am even trying to proxy_pass it to port 81 with another nginx server {} listening on it so it's a fully isolated instance...