Welcome! Log In Create A New Profile

Advanced

location, rewrite и fastcgi_cache

December 23, 2010 04:09PM
Извиняюсь за глупый вопрос, но не могу понять вроде бы простую вещь..
В конфиге у меня прописаны реврайты для location'ов

[code]
location /sections {
rewrite ^/sections/some/page/(.*)$ /index.php?sections=true&id=$1&page=$2;
rewrite ^/sections/some/(.*)$ /index.php?sections=true&id=$1;
rewrite ^/sections$ /index.php?sections=true;
}

location / {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/directory$fastcgi_script_name;
include fastcgi_params;
}
[/code]

Так вот вопрос такой:
Как закешировать только директорию "sections" со всеми реврайтами, переменными, а всё остальное не трогать?

Т.е. как отправить переменные индексу, но кешировать только эту директорию (sections)?

[code]
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/directory$fastcgi_script_name;
fastcgi_cache one;
fastcgi_cache_valid any 3m;
fastcgi_pass_header Cookie;
fastcgi_cache_key 127.0.0.1:9000$http_host$request_uri;
fastcgi_cache_use_stale error timeout invalid_header http_500;
include fastcgi_params;
[/code]
Subject Author Posted

location, rewrite и fastcgi_cache

zosia December 23, 2010 04:09PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 281
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