Browse Source

minor changes in nginx configuration

easyengine-v3
VirtuBox 1 year ago
parent
commit
4f4491fb88
3 changed files with 26 additions and 7 deletions
  1. +7
    -1
      etc/nginx/conf.d/fastcgi.conf
  2. +15
    -4
      etc/nginx/conf.d/stub_status.conf
  3. +4
    -2
      etc/nginx/nginx.conf

+ 7
- 1
etc/nginx/conf.d/fastcgi.conf View File

@@ -1,7 +1,9 @@
# FastCGI cache settings
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:50m inactive=60m;
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:50m inactive=60m max_size=256M;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header updating http_500 http_503;
fastcgi_cache_methods GET HEAD;
fastcgi_cache_valid 200 301 302 404 1h;
fastcgi_buffers 256 32k;
fastcgi_buffer_size 256k;
fastcgi_connect_timeout 4s;
@@ -11,6 +13,10 @@ fastcgi_temp_file_write_size 512K;
fastcgi_param SERVER_NAME $http_host;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
fastcgi_keep_conn on;
fastcgi_intercept_errors on;
fastcgi_cache_background_update on;
fastcgi_socket_keepalive on;
fastcgi_cache_lock on;
fastcgi_cache_lock_age 1s;
fastcgi_cache_lock_timeout 3s;


+ 15
- 4
etc/nginx/conf.d/stub_status.conf View File

@@ -1,15 +1,26 @@
upstream phpstatus {
server 127.0.0.1:9000
server unix:/run/php/php7.0-fpm.sock;
server 127.0.0.1:9070;
server unix:/run/php70-fpm.sock;
}

server {
listen 127.0.0.1:80;
server_name 127.0.0.1;
location ~ ^/(stub_status|nginx_status)$ {
server_name 127.0.0.1 localhost;
location ~ /(stub_status|nginx_status) {
stub_status on;
allow 127.0.0.1;
deny all;
access_log off;
log_not_found off;
}
location ~ ^/(status|ping) {
location ~ /(status|ping) {
include fastcgi_params;
allow 127.0.0.1;
deny all;
fastcgi_pass php7;
fastcgi_pass phpstatus;
access_log off;
log_not_found off;
}
}

+ 4
- 2
etc/nginx/nginx.conf View File

@@ -6,8 +6,9 @@ pid /run/nginx.pid;

events
{
worker_connections 16384;
multi_accept on;
worker_connections 50000;
accept_mutex off;
accept_mutex_delay 200ms;
use epoll;
}

@@ -25,6 +26,7 @@ http

keepalive_timeout 8;
keepalive_requests 500;
keepalive_disable msie6;

lingering_time 20s;
lingering_timeout 5s;


Loading…
Cancel
Save