Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

fastcgi_cache - как отключить для определенного location

$
0
0
Использую конфиг на основе http://wiki.nginx.org/Drupal:

location / {
try_files $uri @rewrite;
}

location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-fpm.sock;

fastcgi_cache tmpcache;
fastcgi_cache_key $uri$is_args$args;
fastcgi_cache_use_stale error timeout invalid_header updating http_500 http_503;
fastcgi_cache_valid 1h;
}


Нужно для страницы /random (index.php?q=random) сделать fastcgi_cache off;
Как это возможно с такой конфигурацией?

Пробовал нижеприведенное, не помогает.
if ($arg_q = "random") {
break;
}

location index.php?q=random {
fastcgi_cache off;
}

Viewing all articles
Browse latest Browse all 53287

Trending Articles