gau1991
10 years ago
9 changed files with 166 additions and 7 deletions
@ -0,0 +1,10 @@ |
|||||
|
# PHP NGINX CONFIGURATION |
||||
|
# DO NOT MODIFY, ALL CHNAGES LOST AFTER UPDATE EasyEngine (ee) |
||||
|
location / { |
||||
|
try_files $uri $uri/ /index.php?$args; |
||||
|
} |
||||
|
location ~ \.php$ { |
||||
|
try_files $uri =404; |
||||
|
include fastcgi_params; |
||||
|
fastcgi_pass hhvm; |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
|
||||
|
# W3TC NGINX CONFIGURATION |
||||
|
# DO NOT MODIFY, ALL CHNAGES LOST AFTER UPDATE EasyEngine (ee) |
||||
|
set $cache_uri $request_uri; |
||||
|
# POST requests and URL with a query string should always go to php |
||||
|
if ($request_method = POST) { |
||||
|
set $cache_uri 'null cache'; |
||||
|
} |
||||
|
if ($query_string != "") { |
||||
|
set $cache_uri 'null cache'; |
||||
|
} |
||||
|
# Don't cache URL containing the following segments |
||||
|
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { |
||||
|
set $cache_uri 'null cache'; |
||||
|
} |
||||
|
# Don't use the cache for logged in users or recent commenter |
||||
|
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") { |
||||
|
set $cache_uri 'null cache'; |
||||
|
} |
||||
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress |
||||
|
location / { |
||||
|
try_files /wp-content/cache/page_enhanced/${host}${cache_uri}_index.html $uri $uri/ /index.php?$args; |
||||
|
} |
||||
|
location ~ ^/wp-content/cache/minify/(.+\.(css|js))$ { |
||||
|
try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1; |
||||
|
} |
||||
|
location ~ \.php$ { |
||||
|
try_files $uri =404; |
||||
|
include fastcgi_params; |
||||
|
fastcgi_pass hhvm; |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
# WPFC NGINX CONFIGURATION |
||||
|
# DO NOT MODIFY, ALL CHNAGES LOST AFTER UPDATE EasyEngine (ee) |
||||
|
set $skip_cache 0; |
||||
|
# POST requests and URL with a query string should always go to php |
||||
|
if ($request_method = POST) { |
||||
|
set $skip_cache 1; |
||||
|
} |
||||
|
if ($query_string != "") { |
||||
|
set $skip_cache 1; |
||||
|
} |
||||
|
# Don't cache URL containing the following segments |
||||
|
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { |
||||
|
set $skip_cache 1; |
||||
|
} |
||||
|
# Don't use the cache for logged in users or recent commenter |
||||
|
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") { |
||||
|
set $skip_cache 1; |
||||
|
} |
||||
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress |
||||
|
location / { |
||||
|
try_files $uri $uri/ /index.php?$args; |
||||
|
} |
||||
|
location ~ ^/wp-content/cache/minify/(.+\.(css|js))$ { |
||||
|
try_files $uri /wp-content/plugins/w3-total-cache/pub/minify.php?file=$1; |
||||
|
} |
||||
|
location ~ \.php$ { |
||||
|
try_files $uri =404; |
||||
|
include fastcgi_params; |
||||
|
fastcgi_pass hhvm; |
||||
|
fastcgi_cache_bypass $skip_cache; |
||||
|
fastcgi_no_cache $skip_cache; |
||||
|
fastcgi_cache WORDPRESS; |
||||
|
} |
||||
|
location ~ /purge(/.*) { |
||||
|
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1"; |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
# WPSC NGINX CONFIGURATION |
||||
|
# DO NOT MODIFY, ALL CHNAGES LOST AFTER UPDATE EasyEngine (ee) |
||||
|
set $cache_uri $request_uri; |
||||
|
# POST requests and URL with a query string should always go to php |
||||
|
if ($request_method = POST) { |
||||
|
set $cache_uri 'null cache'; |
||||
|
} |
||||
|
if ($query_string != "") { |
||||
|
set $cache_uri 'null cache'; |
||||
|
} |
||||
|
# Don't cache URL containing the following segments |
||||
|
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|wp-.*.php|index.php|/feed/|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { |
||||
|
set $cache_uri 'null cache'; |
||||
|
} |
||||
|
# Don't use the cache for logged in users or recent commenter |
||||
|
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") { |
||||
|
set $cache_uri 'null cache'; |
||||
|
} |
||||
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress |
||||
|
location / { |
||||
|
# If we add index.php?$args its break WooCommerce like plugins |
||||
|
# Ref: #330 |
||||
|
try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php; |
||||
|
} |
||||
|
location ~ \.php$ { |
||||
|
try_files $uri =404; |
||||
|
include fastcgi_params; |
||||
|
fastcgi_pass hhvm; |
||||
|
# Following line is needed by WP Super Cache plugin |
||||
|
fastcgi_param SERVER_NAME $http_host; |
||||
|
} |
Loading…
Reference in new issue