Add Cache-Enabler support
This commit is contained in:
@@ -64,7 +64,7 @@ map $http_request_no_cache$cookie_no_cache$uri_no_cache$query_no_cache $skip_cac
|
||||
0000 0;
|
||||
}
|
||||
|
||||
# map $skip_cache with $cache_uri for --wpsc stack
|
||||
# map $skip_cache with $cache_uri for --wpsc --wpce & --wprocket stack
|
||||
map $skip_cache $cache_uri {
|
||||
0 $request_uri;
|
||||
default 'null cache';
|
||||
|
||||
@@ -49,7 +49,7 @@ server {
|
||||
}
|
||||
{{/static}}
|
||||
|
||||
{{^static}}include {{#basic}}common/php73.conf;{{/basic}}{{#wpfc}}common/wpfc-php73.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php73.conf;{{/wpsc}}{{#wpredis}}common/redis-php73.conf;{{/wpredis}}{{#wprocket}}common/wprocket-php73.conf;{{/wprocket}}
|
||||
{{^static}}include {{#basic}}common/php73.conf;{{/basic}}{{#wpfc}}common/wpfc-php73.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php73.conf;{{/wpsc}}{{#wpredis}}common/redis-php73.conf;{{/wpredis}}{{#wprocket}}common/wprocket-php73.conf;{{/wprocket}}{{#wpce}}common/wpce-php73.conf;{{/wpce}}
|
||||
{{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}}
|
||||
{{#wp}}include common/wpcommon-php73.conf;{{/wp}}
|
||||
include common/locations-wo.conf;{{/proxy}}
|
||||
|
||||
@@ -49,7 +49,7 @@ server {
|
||||
}
|
||||
{{/static}}
|
||||
|
||||
{{^static}}include {{#basic}}common/php72.conf;{{/basic}}{{#wpfc}}common/wpfc-php72.conf;{{/wpfc}}{{#wpsc}}common/wpsc-php72.conf;{{/wpsc}}{{#wpredis}}common/redis-php72.conf;{{/wpredis}}{{#wprocket}}common/wprocket-php72.conf;{{/wprocket}}
|
||||
{{^static}}include {{#basic}}common/php72.conf;{{/basic}}{{#wpfc}}common/wpfc-php72.conf;{{/wpfc}}{{#wpsc}}common/wpsc-php72.conf;{{/wpsc}}{{#wpredis}}common/redis-php72.conf;{{/wpredis}}{{#wprocket}}common/wprocket-php72.conf;{{/wprocket}}{{#wpce}}common/wpce-php72.conf;{{/wpce}}
|
||||
{{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}}
|
||||
{{#wp}}include common/wpcommon-php72.conf;{{/wp}}
|
||||
include common/locations-wo.conf;{{/proxy}}
|
||||
|
||||
19
wo/cli/templates/wpce.mustache
Normal file
19
wo/cli/templates/wpce.mustache
Normal file
@@ -0,0 +1,19 @@
|
||||
# WPCE 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/cache-enabler/${http_host}${cache_uri}index.html $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass {{upstream}};
|
||||
}
|
||||
location ~* /cache/cache-enabler/\.html$ {
|
||||
etag on;
|
||||
add_header Vary "Accept-Encoding, Cookie";
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
expires 10h;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# WPSC NGINX CONFIGURATION - WO v3.9.7
|
||||
# WPROCKET 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
|
||||
|
||||
Reference in New Issue
Block a user