Welcome! Log In Create A New Profile

Advanced

fastcgi_cache_valid для разных location'ов

March 01, 2013 05:45PM
Привет!

Есть примерно такой вот конфиг:

location /aaa/ {
rewrite ^/aaa/([0-9]+)\.html$ /test.php?p1=$1 last;
}

location /bbb/ {
rewrite ^/bbb/([0-9]+)\.html$ /test2.php?p1=$1 last;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_cache mycache;
fastcgi_cache_key $scheme$host$request_uri$request_method;
fastcgi_cache_valid 200 301 302 60m;
}

Хотелось бы сделать чтоб если срабатывал aaa location, то выдача хэшировалась скажем 5 минут, location bbb - 10 минут. Остальное час.
Как такое сделать?
Subject Author Posted

fastcgi_cache_valid для разных location'ов

Namaste March 01, 2013 05:45PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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