reworked php7.3 stack

* replace previous stack php7 variables
* properly set stack php = php7.2 and php73 = php7.3
* rename upstream php72 and php73 to avoid issues when migrating from EEv3
* use unix socket in nginx upstream instead of TCP/IP
This commit is contained in:
VirtuBox
2019-03-04 06:44:21 +01:00
parent 1b4b90040c
commit a49b9701bd
15 changed files with 167 additions and 200 deletions

View File

@@ -39,6 +39,6 @@ server {
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php;
fastcgi_pass php72;
}
}

View File

@@ -59,7 +59,7 @@ location = /nginx_status {
}
location ~ ^/(status|ping)$ {
include fastcgi_params;
fastcgi_pass php7;
fastcgi_pass php73;
include common/acl.conf;
}
# WordOps (wo) utilities

View File

@@ -59,7 +59,7 @@ location = /nginx_status {
}
location ~ ^/(status|ping)$ {
include fastcgi_params;
fastcgi_pass php;
fastcgi_pass php72;
include common/acl.conf;
}
# WordOps (wo) utilities

View File

@@ -4,7 +4,7 @@ server 127.0.0.1:9000;
}
upstream debug {
# Debug Pool
server 127.0.0.1:9100;
server 127.0.0.1:9001;
}
upstream php72 {
server unix:/var/run/php/php72-fpm.sock;

View File

@@ -4,7 +4,7 @@
location = /wp-login.php {
limit_req zone=one burst=1 nodelay;
include fastcgi_params;
fastcgi_pass php;
fastcgi_pass php72;
}
# Disable wp-config.txt
location = /wp-config.txt {

View File

@@ -1,28 +1,11 @@
# WPFC NGINX CONFIGURATION
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
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.*\.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;
}
# $skip_cache variable set in /etc/nginx/conf.d/map-wp-fastcgi-cache.conf
# Use cached or actual file if they exists, Otherwise pass request to WordPress
location / {
try_files $uri $uri/ /index.php$is_args$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;

View File

@@ -1,28 +1,11 @@
# WPFC NGINX CONFIGURATION
# DO NOT MODIFY, ALL CHANGES WILL BE LOST AFTER AN WordOps (wo) UPDATE
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.*\.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;
}
# $skip_cache variable set in /etc/nginx/conf.d/map-wp-fastcgi-cache.conf
# Use cached or actual file if they exists, Otherwise pass request to WordPress
location / {
try_files $uri $uri/ /index.php$is_args$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;