nginx location+proxy_pass?

David Salgado david at digitalronin.com
Fri Oct 19 18:04:50 MSD 2007


On 19/10/2007, Roxis <roxis at list.ru> wrote:
>
> proxy_pass http://mongrel_cluster1/app1
>

Thanks, but that's not quite what I want. I'm trying to remove the
'app1' part before the request gets to the mongrel cluster. Also, the
line above results in the error;

    "proxy_pass" may not have URI part in location given by regular expression

Actually, I think I've solved the initial problem. Instead of;

  rewrite  ^/app1/(.*)$  /$1  permanent;

...it should be;

  rewrite  ^/app1/(.*)$  /$1;

This does what I want - rewrites the URL but continues processing so
that it hits the proxy_pass directive on the next line.

Thanks again

David





More information about the nginx mailing list