2019-12-03 19:48:18 +01:00
|
|
|
# WPROCKET NGINX CONFIGURATION - WordOps {{release}}
|
2019-08-05 19:17:59 +02:00
|
|
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
|
|
|
|
# $cache_uri variable set in /etc/nginx/conf.d/map-wp.conf
|
|
|
|
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
|
|
|
|
location / {
|
2019-08-19 18:15:07 +02:00
|
|
|
try_files /wp-content/cache/wp-rocket/$http_host/$cache_uri/index${mobile_prefix}${https_prefix}.html /wp-content/cache/wp-rocket/$http_host/$cache_uri/index${https_prefix}.html $uri $uri/ /index.php$is_args$args;
|
2019-08-05 19:17:59 +02:00
|
|
|
}
|
|
|
|
|
location ~ \.php$ {
|
2019-08-08 08:40:03 +02:00
|
|
|
try_files $uri =404;
|
|
|
|
|
include fastcgi_params;
|
2019-08-19 18:15:07 +02:00
|
|
|
fastcgi_pass {{upstream}};
|
2019-08-05 19:17:59 +02:00
|
|
|
}
|
2019-12-03 19:48:18 +01:00
|
|
|
location ~ /wp-content/cache/wp-rocket/*\.html$ {
|
2019-08-08 08:40:03 +02:00
|
|
|
etag on;
|
2019-12-03 19:48:18 +01:00
|
|
|
gzip_static on;
|
2019-08-08 08:40:03 +02:00
|
|
|
add_header Vary "Accept-Encoding, Cookie";
|
2019-08-05 19:17:59 +02:00
|
|
|
access_log off;
|
|
|
|
|
log_not_found off;
|
2019-08-08 08:40:03 +02:00
|
|
|
expires 10h;
|
|
|
|
|
}
|