wordpress 上传文件 2018/05/08 17:36:18 [error] 15016#0: *709 upstream prematurely closed connection while reading response header from upstream, client: 14.156.36.104, server: www.xxx.com, request: "POST /wp-admin/async-upload.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "www.xxx.com", referrer: "https://www.xxx.com/wp-admin/upload.php"
各版本号 wordpress centos 7 64 nginx:nginx-tengine2.2 php:5.6
nginx.conf user www www; worker_processes auto; error_log /www/wwwlogs/nginx_error.log crit; pid /www/server/nginx/logs/nginx.pid; worker_rlimit_nofile 51200;
events { use epoll; worker_connections 51200; multi_accept on; }
http { include mime.types; include proxy.conf;
default_type application/octet-stream;
server_names_hash_bucket_size 512;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 500m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
#缓存被频繁访问的文件相关的信息
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 256k;
fastcgi_buffers 16 256k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;
fastcgi_intercept_errors on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
limit_conn_zone $binary_remote_addr zone=perip:10m;
limit_conn_zone $server_name zone=perserver:10m;
server_tokens off;
access_log off;
server { listen 888; server_name www.bt.cn; index index.html index.htm index.php; root /www/server/stop;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log /www/wwwlogs/access.log;
}
server { listen 80 default; return 444; }
include /www/server/panel/vhost/nginx/*.conf; }
keepalive_timeout 设置到 600 也不行。 通过修改 proxy.conf 也不行。