Quantcast
Channel: Nginx Forum - Nginx Mailing List - Russian
Viewing all articles
Browse latest Browse all 3102

fastcgi_cache_valid для разных location'ов (no replies)

$
0
0
Привет!

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

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 минут. Остальное час.
Как такое сделать?

Viewing all articles
Browse latest Browse all 3102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>