Welcome! Log In Create A New Profile

Advanced

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

Posted by dberror 
Использую конфиг на основе 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;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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