Welcome! Log In Create A New Profile

Advanced

Re: Tricky configuration rewrite rules (Symfony+FastCGI+Cache)

Gena Makhomed
July 12, 2012 08:28AM
On 11.07.2012 23:21, Valery N. wrote:

> Попробовал как вы посоветвали. К сожалению при указании try_files $uri
> /index.php?$args; опять же все уходит правилу location ~ \.php$ { КЕШ
> } который НЕ внутри location /accounts/ { }. Такое ощущение что
> location внутри другого locationа имеет меньший приоритет или
> игнорируется

в документации к директиве try_files есть пример для таких случаев
http://nginx.org/ru/docs/http/ngx_http_core_module.html#try_files

т.е. фрагмент конфига будет примерно такой:

location ^~ /accounts/ {
try_files $uri @symfony;
# тут fastcgi_pass без fastcgi_cache
}

location @symfony {
fastcgi_param SCRIPT_FILENAME /path/to/index.php;
fastcgi_param SCRIPT_NAME /index.php;
fastcgi_param QUERY_STRING $args;
# тут fastcgi_pass без fastcgi_cache
}

--
Best regards,
Gena



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

Tricky configuration rewrite rules (Symfony+FastCGI+Cache)

cat_crash July 11, 2012 10:24AM

Re: Tricky configuration rewrite rules (Symfony+FastCGI+Cache)

Anton Yuzhaninov July 11, 2012 10:40AM

Re: Tricky configuration rewrite rules (Symfony+FastCGI+Cache)

Gena Makhomed July 11, 2012 12:46PM

Re: Tricky configuration rewrite rules (Symfony+FastCGI+Cache)

cat_crash July 11, 2012 04:22PM

Re: Tricky configuration rewrite rules (Symfony+FastCGI+Cache)

Gena Makhomed July 12, 2012 08:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 89
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready