location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ ^/backend/api/[0-9]/getstat$ {
add_header X-TEST "istest";
# Кеш
fastcgi_cache getstat;
fastcgi_cache_valid 200 301 1m;
fastcgi_cache_valid 401 404 3m;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php_farm;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include nginx.fastcgi.conf;
include nginx.redis.conf;
}
try_files $uri $uri/ /index.php?$query_string;
server {
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
include nginx.fastcgi.conf;
include nginx.redis.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass php_farm;
# Кеш
fastcgi_cache getstat;
fastcgi_cache_valid 200 301 1m;
}
}
server {
location ~ ^/backend/api/[0-9]/getstat$ {
add_header X-TEST "istest";
# Кеш
fastcgi_cache getstat;
fastcgi_cache_valid 200 1m;
try_files $uri $uri/ /index.php?$query_string;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
include nginx.fastcgi.conf;
include nginx.redis.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass php_farm;
}
}
location ~ ^/backend/api/[0-9]/getstat$ {
return 401;
}