minor changes in nginx configuration
This commit is contained in:
parent
a343dec9fd
commit
4f4491fb88
|
@ -1,7 +1,9 @@
|
||||||
# FastCGI cache settings
|
# 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_key "$scheme$request_method$host$request_uri";
|
||||||
fastcgi_cache_use_stale error timeout invalid_header updating http_500 http_503;
|
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_buffers 256 32k;
|
||||||
fastcgi_buffer_size 256k;
|
fastcgi_buffer_size 256k;
|
||||||
fastcgi_connect_timeout 4s;
|
fastcgi_connect_timeout 4s;
|
||||||
|
@ -11,6 +13,10 @@ fastcgi_temp_file_write_size 512K;
|
||||||
fastcgi_param SERVER_NAME $http_host;
|
fastcgi_param SERVER_NAME $http_host;
|
||||||
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
|
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
|
||||||
fastcgi_keep_conn on;
|
fastcgi_keep_conn on;
|
||||||
|
fastcgi_intercept_errors on;
|
||||||
fastcgi_cache_background_update on;
|
fastcgi_cache_background_update on;
|
||||||
fastcgi_socket_keepalive on;
|
fastcgi_socket_keepalive on;
|
||||||
|
fastcgi_cache_lock on;
|
||||||
|
fastcgi_cache_lock_age 1s;
|
||||||
|
fastcgi_cache_lock_timeout 3s;
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
server {
|
||||||
listen 127.0.0.1:80;
|
listen 127.0.0.1:80;
|
||||||
server_name 127.0.0.1;
|
server_name 127.0.0.1 localhost;
|
||||||
location ~ ^/(stub_status|nginx_status)$ {
|
location ~ /(stub_status|nginx_status) {
|
||||||
stub_status on;
|
stub_status on;
|
||||||
allow 127.0.0.1;
|
allow 127.0.0.1;
|
||||||
deny all;
|
deny all;
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
}
|
}
|
||||||
location ~ ^/(status|ping) {
|
location ~ /(status|ping) {
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
allow 127.0.0.1;
|
allow 127.0.0.1;
|
||||||
deny all;
|
deny all;
|
||||||
fastcgi_pass php7;
|
fastcgi_pass phpstatus;
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,9 @@ pid /run/nginx.pid;
|
||||||
|
|
||||||
events
|
events
|
||||||
{
|
{
|
||||||
worker_connections 16384;
|
worker_connections 50000;
|
||||||
multi_accept on;
|
accept_mutex off;
|
||||||
|
accept_mutex_delay 200ms;
|
||||||
use epoll;
|
use epoll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +26,7 @@ http
|
||||||
|
|
||||||
keepalive_timeout 8;
|
keepalive_timeout 8;
|
||||||
keepalive_requests 500;
|
keepalive_requests 500;
|
||||||
|
keepalive_disable msie6;
|
||||||
|
|
||||||
lingering_time 20s;
|
lingering_time 20s;
|
||||||
lingering_timeout 5s;
|
lingering_timeout 5s;
|
||||||
|
|
Loading…
Reference in New Issue