Implement --wprocket
* cleanup templates by using variables * add configuration for wp-rocket * update mapping for wp-rocket
This commit is contained in:
21
wo/cli/templates/wprocket.mustache
Normal file
21
wo/cli/templates/wprocket.mustache
Normal file
@@ -0,0 +1,21 @@
|
||||
# WPSC NGINX CONFIGURATION - WO v3.9.7
|
||||
# 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 / {
|
||||
try_files /wp-content/cache/wp-rocket/$http_host/$cache_uri/index$https_prefix.html $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass {{upstream}};
|
||||
}
|
||||
|
||||
location ~* /cache/wp-rocket/\.html$ {
|
||||
etag on;
|
||||
add_header Vary "Accept-Encoding, Cookie";
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
expire 10h;
|
||||
}
|
||||
Reference in New Issue
Block a user