new nginx templates and wo man
This commit is contained in:
32
docs/wo.8
32
docs/wo.8
@@ -5,15 +5,15 @@
|
|||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
wo [ --version | --help | info | stack | site | debug | update | clean | import_slow_log | log | secure | sync]
|
wo [ --version | --help | info | stack | site | debug | update | clean | import_slow_log | log | secure | sync]
|
||||||
.TP
|
.TP
|
||||||
wo stack [ install | remove | purge | migrate | upgrade] [ --web | --mail | --all | --nginx | --php | --php72 | --mysql | --admin | --postfix | --mailscanner | --adminer | --redis | --hhvm | --phpmyadmin | --phpredisadmin | --wpcli | --utils ]
|
wo stack [ install | remove | purge | migrate | upgrade] [ --web | --all | --nginx | --php | --php73 | --mysql | --admin | --adminer | --redis | --hhvm | --phpmyadmin | --phpredisadmin | --wpcli | --utils ]
|
||||||
.TP
|
.TP
|
||||||
wo stack [ status | start | stop | reload | restart ] [--all | --nginx | --php | --php72 |--mysql | --devcot | --web | --postfix | --memcache | --redis]
|
wo stack [ status | start | stop | reload | restart ] [--all | --nginx | --php | --php73 |--mysql | --web | --memcache | --redis]
|
||||||
.TP
|
.TP
|
||||||
wo site [ list | info | show | enable | disable | edit | cd | show ] [ example.com ]
|
wo site [ list | info | show | enable | disable | edit | cd | show ] [ example.com ]
|
||||||
.TP
|
.TP
|
||||||
wo site create example.com [ --html | --php | --php72 | --mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --w3tc | --wpfc | --wpredis | --hhvm | --letsencrypt/-le]]
|
wo site create example.com [ --html | --php | --php73 | --mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis | --hhvm | --letsencrypt/-le]]
|
||||||
.TP
|
.TP
|
||||||
wo site update example.com [ --php | --php72 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --w3tc | --wpfc | --wpredis | --hhvm ] [--password] [--letsencrypt=on/off/renew]]
|
wo site update example.com [ --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis | --hhvm ] [--password] [--letsencrypt=on/off/renew]]
|
||||||
.TP
|
.TP
|
||||||
wo site delete example.com [--db | --files | --all | --no-prompt | --force/-f ]
|
wo site delete example.com [--db | --files | --all | --no-prompt | --force/-f ]
|
||||||
.TP
|
.TP
|
||||||
@@ -46,19 +46,19 @@ Display WordOps (wo) help.
|
|||||||
.TP
|
.TP
|
||||||
.B stack
|
.B stack
|
||||||
.TP
|
.TP
|
||||||
.B install [ --all | --web | --mail | --nginx | --php | --php72 |--mysql | --redis | --postfix | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils ]
|
.B install [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils ]
|
||||||
.br
|
.br
|
||||||
Install Nginx PHP5 MySQL Postfix stack Packages if not used with
|
Install Nginx PHP5 MySQL Postfix stack Packages if not used with
|
||||||
.br
|
.br
|
||||||
any options.Installs specific package if used with option.
|
any options.Installs specific package if used with option.
|
||||||
.TP
|
.TP
|
||||||
.B remove [ --all | --web | --mail | --nginx | --php | --php72 |--mysql | --redis | --postfix | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils ]
|
.B remove [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils ]
|
||||||
.br
|
.br
|
||||||
Remove Nginx PHP5 MySQL Postfix stack Packages if not used with
|
Remove Nginx PHP5 MySQL Postfix stack Packages if not used with
|
||||||
.br
|
.br
|
||||||
any options. Remove specific package if used with option.
|
any options. Remove specific package if used with option.
|
||||||
.TP
|
.TP
|
||||||
.B purge [ --all | --web | --mail | --nginx | --php | --php72 |--mysql | --redis | --postfix | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils ]
|
.B purge [ --all | --web | --nginx | --php | --php73 |--mysql | --redis | --adminer | --phpmyadmin | --phpredismyadmin | --wpcli | --utils ]
|
||||||
.br
|
.br
|
||||||
Purge Nginx PHP5 MySQL Postfix stack Packages if not used with any
|
Purge Nginx PHP5 MySQL Postfix stack Packages if not used with any
|
||||||
.br
|
.br
|
||||||
@@ -66,23 +66,23 @@ options.Purge specific package if used with option.
|
|||||||
.TP
|
.TP
|
||||||
.B status
|
.B status
|
||||||
.br
|
.br
|
||||||
Display status of NGINX, PHP5-FPM, MySQL, Postfix, Redis-Server services.
|
Display status of NGINX, PHP7.2-FPM, MySQL, Redis-Server services.
|
||||||
.TP
|
.TP
|
||||||
.B start
|
.B start
|
||||||
.br
|
.br
|
||||||
Start services NGINX, PHP5-FPM, MySQL, Postfix, Redis-Server.
|
Start services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||||
.TP
|
.TP
|
||||||
.B stop
|
.B stop
|
||||||
.br
|
.br
|
||||||
Stop services NGINX, PHP5-FPM, MySQL, Postfix, Redis-Server.
|
Stop services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||||
.TP
|
.TP
|
||||||
.B reload
|
.B reload
|
||||||
.br
|
.br
|
||||||
Reload services NGINX, PHP5-FPM, MySQL, Postfix, Redis-Server.
|
Reload services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||||
.TP
|
.TP
|
||||||
.B restart
|
.B restart
|
||||||
.br
|
.br
|
||||||
Restart services NGINX, PHP5-FPM, MySQL, Postfix, Redis-Server.
|
Restart services NGINX, PHP7.2-FPM, MySQL, Redis-Server.
|
||||||
.TP
|
.TP
|
||||||
.B site
|
.B site
|
||||||
.br
|
.br
|
||||||
@@ -129,13 +129,13 @@ Disable site by Destroying softlink with site file in
|
|||||||
.br
|
.br
|
||||||
Edit NGINX configuration of site.
|
Edit NGINX configuration of site.
|
||||||
.TP
|
.TP
|
||||||
.B create [ example.com ] [ --html | --php | --php72 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --w3tc | --wpfc | --wpredis | --hhvm ]]
|
.B create [ example.com ] [ --html | --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [--wpsc | --wpfc | --wpredis | --hhvm ]]
|
||||||
.br
|
.br
|
||||||
Create new site according to given options. If no options provided
|
Create new site according to given options. If no options provided
|
||||||
.br
|
.br
|
||||||
create static site with html only.
|
create static site with html only.
|
||||||
.TP
|
.TP
|
||||||
.B update [ example.com ] [ --html | --php | --php72 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [ --wpsc | --w3tc | --wpfc | --wpredis | --hhvm ] [--password]]
|
.B update [ example.com ] [ --html | --php | --php73 |--mysql] [[--wp | --wpsubdir | --wpsubdomain ] [ --wpsc | --wpfc | --wpredis | --hhvm ] [--password]]
|
||||||
.br
|
.br
|
||||||
Update site configuration according to specified options.
|
Update site configuration according to specified options.
|
||||||
.TP
|
.TP
|
||||||
@@ -143,7 +143,7 @@ Update site configuration according to specified options.
|
|||||||
.br
|
.br
|
||||||
Delete site i.e webroot, database, ad configuration permanently.
|
Delete site i.e webroot, database, ad configuration permanently.
|
||||||
.TP
|
.TP
|
||||||
.B debug [ -i | --nginx=on/off | --php=on/off | --php72=on/off | --mysql=on/off | --rewrite=on/off | --fpm=on/off | --fpm7=on/off ]
|
.B debug [ -i | --nginx=on/off | --php=on/off | --php73=on/off | --mysql=on/off | --rewrite=on/off | --fpm=on/off | --fpm7=on/off ]
|
||||||
.br
|
.br
|
||||||
Starts server level debugging. If this is used without arguments it will start debugging
|
Starts server level debugging. If this is used without arguments it will start debugging
|
||||||
.br
|
.br
|
||||||
@@ -182,7 +182,7 @@ used with wo debug command. used to start or stop nginx debugging.
|
|||||||
.br
|
.br
|
||||||
used with wo debug command. used to start or stop php debugging.
|
used with wo debug command. used to start or stop php debugging.
|
||||||
.TP
|
.TP
|
||||||
.B --php72=on/off
|
.B --php73=on/off
|
||||||
.br
|
.br
|
||||||
used with wo debug command. used to start or stop php72 debugging.
|
used with wo debug command. used to start or stop php72 debugging.
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -254,13 +254,22 @@ class WOStackController(CementBaseController):
|
|||||||
wo_nginx.close()
|
wo_nginx.close()
|
||||||
|
|
||||||
Log.debug(self, 'Writting the nginx configuration to '
|
Log.debug(self, 'Writting the nginx configuration to '
|
||||||
'file /etc/nginx/conf.d/map-wp-fastcgi-cache.conf')
|
'file /etc/nginx/conf.d/map-wp.conf')
|
||||||
wo_nginx = open('/etc/nginx/conf.d/map-wp-fastcgi-cache.conf',
|
wo_nginx = open('/etc/nginx/conf.d/map-wp.conf',
|
||||||
encoding='utf-8', mode='w')
|
encoding='utf-8', mode='w')
|
||||||
self.app.render((data), 'fastcgi-cache.mustache',
|
self.app.render((data), 'map-wp.mustache',
|
||||||
out=wo_nginx)
|
out=wo_nginx)
|
||||||
wo_nginx.close()
|
wo_nginx.close()
|
||||||
|
|
||||||
|
if not (os.path.isfile('/etc/nginx/conf.d/webp.conf')):
|
||||||
|
Log.debug(self, 'Writting the nginx configuration to '
|
||||||
|
'file /etc/nginx/conf.d/webp.conf')
|
||||||
|
wo_nginx = open('/etc/nginx/conf.d/webp.conf',
|
||||||
|
encoding='utf-8', mode='w')
|
||||||
|
self.app.render((data), 'webp.mustache',
|
||||||
|
out=wo_nginx)
|
||||||
|
wo_nginx.close()
|
||||||
|
|
||||||
# Setup Nginx common directory
|
# Setup Nginx common directory
|
||||||
if not os.path.exists('/etc/nginx/common'):
|
if not os.path.exists('/etc/nginx/common'):
|
||||||
Log.debug(self, 'Creating directory'
|
Log.debug(self, 'Creating directory'
|
||||||
@@ -317,8 +326,8 @@ class WOStackController(CementBaseController):
|
|||||||
wo_nginx.close()
|
wo_nginx.close()
|
||||||
|
|
||||||
Log.debug(self, 'Writting the nginx configuration to '
|
Log.debug(self, 'Writting the nginx configuration to '
|
||||||
'file /etc/nginx/common/wpsubdir-php72.conf')
|
'file /etc/nginx/common/wpsubdir.conf')
|
||||||
wo_nginx = open('/etc/nginx/common/wpsubdir-php72.conf',
|
wo_nginx = open('/etc/nginx/common/wpsubdir.conf',
|
||||||
encoding='utf-8', mode='w')
|
encoding='utf-8', mode='w')
|
||||||
self.app.render((data), 'wpsubdir.mustache',
|
self.app.render((data), 'wpsubdir.mustache',
|
||||||
out=wo_nginx)
|
out=wo_nginx)
|
||||||
|
|||||||
@@ -1,21 +1,7 @@
|
|||||||
# Redis NGINX CONFIGURATION
|
# Redis NGINX CONFIGURATION
|
||||||
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
||||||
set $skip_cache 0;
|
# $skip_cache variable set in /etc/nginx/conf.d/map-wp.conf
|
||||||
# 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.*\.xml)") {
|
|
||||||
set $skip_cache 1;
|
|
||||||
}
|
|
||||||
# Don't use the cache for logged in users or recent commenter or customer with items in cart
|
|
||||||
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|[a-z0-9]+_items_in_cart") {
|
|
||||||
set $skip_cache 1;
|
|
||||||
}
|
|
||||||
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
|||||||
@@ -1,21 +1,7 @@
|
|||||||
# Redis NGINX CONFIGURATION
|
# Redis NGINX CONFIGURATION
|
||||||
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
||||||
set $skip_cache 0;
|
# $skip_cache variable set in /etc/nginx/conf.d/map-wp.conf
|
||||||
# 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.*\.xml)") {
|
|
||||||
set $skip_cache 1;
|
|
||||||
}
|
|
||||||
# Don't use the cache for logged in users or recent commenter or customer with items in cart
|
|
||||||
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|[a-z0-9]+_items_in_cart") {
|
|
||||||
set $skip_cache 1;
|
|
||||||
}
|
|
||||||
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ server {
|
|||||||
{{/static}}
|
{{/static}}
|
||||||
|
|
||||||
{{^static}}include {{^hhvm}}{{#basic}}common/php73.conf;{{/basic}}{{#wpfc}}common/wpfc-php73.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php73.conf;{{/wpsc}}{{#wpredis}}common/redis-php73.conf;{{/wpredis}} {{/hhvm}}{{#hhvm}}{{#basic}}common/php-hhvm.conf;{{/basic}}{{#wpfc}}common/wpfc-hhvm.conf;{{/wpfc}} {{#wpsc}}common/wpsc-hhvm.conf;{{/wpsc}}{{#wpredis}}common/redis-hhvm.conf;{{/wpredis}} {{/hhvm}}
|
{{^static}}include {{^hhvm}}{{#basic}}common/php73.conf;{{/basic}}{{#wpfc}}common/wpfc-php73.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php73.conf;{{/wpsc}}{{#wpredis}}common/redis-php73.conf;{{/wpredis}} {{/hhvm}}{{#hhvm}}{{#basic}}common/php-hhvm.conf;{{/basic}}{{#wpfc}}common/wpfc-hhvm.conf;{{/wpfc}} {{#wpsc}}common/wpsc-hhvm.conf;{{/wpsc}}{{#wpredis}}common/redis-hhvm.conf;{{/wpredis}} {{/hhvm}}
|
||||||
{{#wpsubdir}}include common/wpsubdir-php73.conf;{{/wpsubdir}}{{/static}}
|
{{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}}
|
||||||
{{#wp}}include common/wpcommon-php73.conf;{{/wp}}
|
{{#wp}}include common/wpcommon-php73.conf;{{/wp}}
|
||||||
{{^proxy}}include common/locations-php73.conf;{{/proxy}}
|
{{^proxy}}include common/locations-php73.conf;{{/proxy}}
|
||||||
{{^vma}}{{^rc}}include {{webroot}}/conf/nginx/*.conf;{{/rc}}{{/vma}}
|
{{^vma}}{{^rc}}include {{webroot}}/conf/nginx/*.conf;{{/rc}}{{/vma}}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ server {
|
|||||||
}
|
}
|
||||||
{{/static}}
|
{{/static}}
|
||||||
|
|
||||||
{{^static}}include {{^hhvm}}{{#basic}}common/php72.conf;{{/basic}}{{#wpfc}}common/wpfc-php72.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php72.conf;{{/wpsc}}{{#wpredis}}common/redis-php72.conf;{{/wpredis}} {{/hhvm}}{{#hhvm}}{{#basic}}common/php-hhvm.conf;{{/basic}}{{#wpfc}}common/wpfc-hhvm.conf;{{/wpfc}} {{#wpsc}}common/wpsc-hhvm.conf;{{/wpsc}}{{#wpredis}}common/redis-hhvm.conf;{{/wpredis}} {{/hhvm}} {{#wpsubdir}}include common/wpsubdir-php72.conf;{{/wpsubdir}}{{/static}}
|
{{^static}}include {{^hhvm}}{{#basic}}common/php72.conf;{{/basic}}{{#wpfc}}common/wpfc-php72.conf;{{/wpfc}} {{#wpsc}}common/wpsc-php72.conf;{{/wpsc}}{{#wpredis}}common/redis-php72.conf;{{/wpredis}} {{/hhvm}}{{#hhvm}}{{#basic}}common/php-hhvm.conf;{{/basic}}{{#wpfc}}common/wpfc-hhvm.conf;{{/wpfc}} {{#wpsc}}common/wpsc-hhvm.conf;{{/wpsc}}{{#wpredis}}common/redis-hhvm.conf;{{/wpredis}} {{/hhvm}} {{#wpsubdir}}include common/wpsubdir.conf;{{/wpsubdir}}{{/static}}
|
||||||
{{#wp}}include common/wpcommon-php72.conf;{{/wp}}
|
{{#wp}}include common/wpcommon-php72.conf;{{/wp}}
|
||||||
{{^proxy}}include common/locations-php72.conf;{{/proxy}}
|
{{^proxy}}include common/locations-php72.conf;{{/proxy}}
|
||||||
{{^vma}}{{^rc}}include {{webroot}}/conf/nginx/*.conf;{{/rc}}{{/vma}}
|
{{^vma}}{{^rc}}include {{webroot}}/conf/nginx/*.conf;{{/rc}}{{/vma}}
|
||||||
|
|||||||
7
wo/cli/templates/webp.mustache
Normal file
7
wo/cli/templates/webp.mustache
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# WEBP NGINX CONFIGURATION
|
||||||
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
||||||
|
|
||||||
|
map $http_accept $webp_suffix {
|
||||||
|
default "";
|
||||||
|
"~*webp" ".webp";
|
||||||
|
}
|
||||||
@@ -1,21 +1,7 @@
|
|||||||
# WPFC NGINX CONFIGURATION
|
# WPFC NGINX CONFIGURATION
|
||||||
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
||||||
set $skip_cache 0;
|
# $skip_cache variable set in /etc/nginx/conf.d/map-wp.conf
|
||||||
# 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.*\.xml)") {
|
|
||||||
set $skip_cache 1;
|
|
||||||
}
|
|
||||||
# Don't use the cache for logged in users or recent commenter or customer with items in cart
|
|
||||||
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|[a-z0-9]+_items_in_cart") {
|
|
||||||
set $skip_cache 1;
|
|
||||||
}
|
|
||||||
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
# WPFC NGINX CONFIGURATION
|
# WPFC NGINX CONFIGURATION
|
||||||
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
||||||
# $skip_cache variable set in /etc/nginx/conf.d/map-wp-fastcgi-cache.conf
|
# $skip_cache variable set in /etc/nginx/conf.d/map-wp.conf
|
||||||
|
|
||||||
|
add_header X-fastcgi-cache $upstream_cache_status;
|
||||||
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
# WPFC NGINX CONFIGURATION
|
# WPFC NGINX CONFIGURATION
|
||||||
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
||||||
# $skip_cache variable set in /etc/nginx/conf.d/map-wp-fastcgi-cache.conf
|
# $skip_cache variable set in /etc/nginx/conf.d/map-wp.conf
|
||||||
|
|
||||||
|
add_header X-fastcgi-cache $upstream_cache_status;
|
||||||
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
|||||||
@@ -1,21 +1,7 @@
|
|||||||
# WPSC NGINX CONFIGURATION
|
# WPSC NGINX CONFIGURATION
|
||||||
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
||||||
set $cache_uri $request_uri;
|
# $skip_cache variable set in /etc/nginx/conf.d/map-wp.conf
|
||||||
# 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.*\.xml)") {
|
|
||||||
set $cache_uri 'null cache';
|
|
||||||
}
|
|
||||||
# Don't use the cache for logged in users or recent commenter or customer with items in cart
|
|
||||||
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in|[a-z0-9]+_items_in_cart") {
|
|
||||||
set $cache_uri 'null cache';
|
|
||||||
}
|
|
||||||
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
||||||
location / {
|
location / {
|
||||||
# If we add index.php?$args its break WooCommerce like plugins
|
# If we add index.php?$args its break WooCommerce like plugins
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# WPSC NGINX CONFIGURATION
|
# WPSC NGINX CONFIGURATION
|
||||||
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
# 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
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
||||||
location / {
|
location / {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# WPSC NGINX CONFIGURATION
|
# WPSC NGINX CONFIGURATION
|
||||||
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
|
# 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
|
# Use cached or actual file if they exists, Otherwise pass request to WordPress
|
||||||
location / {
|
location / {
|
||||||
|
|||||||
Reference in New Issue
Block a user