Welcome! Log In Create A New Profile

Advanced

Re: try_files doesn't work after $args rewite?

Maxim Dounin
December 19, 2011 09:18AM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

try_files doesn't work after $args rewite?

"Brane F. Gračnar" December 19, 2011 09:12AM

Re: try_files doesn't work after $args rewite?

Maxim Dounin December 19, 2011 09:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready