2019-12-03 19:48:18 +01:00
|
|
|
# WPFC NGINX CONFIGURATION - WordOps {{release}}
|
2018-11-13 21:55:59 +01:00
|
|
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
2019-03-06 15:32:07 +01:00
|
|
|
# $skip_cache variable set in /etc/nginx/conf.d/map-wp.conf
|
2019-03-04 06:44:21 +01:00
|
|
|
|
2019-03-06 15:32:07 +01:00
|
|
|
add_header X-fastcgi-cache $upstream_cache_status;
|
2018-11-13 21:55:59 +01:00
|
|
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
|
|
|
|
location / {
|
2019-02-25 07:47:36 +01:00
|
|
|
try_files $uri $uri/ /index.php$is_args$args;
|
2018-11-13 21:55:59 +01:00
|
|
|
}
|
|
|
|
|
location ~ \.php$ {
|
|
|
|
|
try_files $uri =404;
|
|
|
|
|
include fastcgi_params;
|
2019-08-05 19:17:59 +02:00
|
|
|
fastcgi_pass {{upstream}};
|
2018-11-13 21:55:59 +01:00
|
|
|
fastcgi_cache_bypass $skip_cache;
|
|
|
|
|
fastcgi_no_cache $skip_cache;
|
|
|
|
|
fastcgi_cache WORDPRESS;
|
|
|
|
|
}
|
|
|
|
|
location ~ /purge(/.*) {
|
|
|
|
|
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
|
|
|
|
|
access_log off;
|
|
|
|
|
}
|