try_files doesn't work after $args rewite?
Maxim Dounin
mdounin at mdounin.ru
Mon Dec 19 14:17:22 UTC 2011
Hello!
On Mon, Dec 19, 2011 at 03:11:06PM +0100, "Brane F. Gračnar" wrote:
> Hello
>
> Directive try_files doesn't work after rewriting $args:
>
> location / {
> # remove auth key from query string
> if ($args ~ ^(.*)&?auth=[^&]+(.*)) {
> set $args "$1$2";
> }
>
> try_files $uri $uri/ @webapp;
> }
>
> location @webapp {
> # send request to upstream
> proxy_pass http://some_upstream;
> }
>
> Log:
>
> 2011/12/19 15:05:16 [error] 29913#0: *40 open()
> "/var/www/sth/Rest.svc/event/5826710" failed (2: No such file or
> directory), client: 172.16.16.81, server: epg.siol.tv, request: "GET
> /sth/Rest.svc/event/5826710?auth=blahblahblah HTTP/1.1", host: "epg.siol.tv"
>
> What am i doing wrong?
http://wiki.nginx.org/IfIsEvil
Maxim Dounin
More information about the nginx
mailing list