修改/etc/nginx/conf/nginx.conf
# 全局配置
user www;
worker_processes auto;
error_log /var/log/nginx/error.log;
# 事件模块配置
events {
worker_connections 1024;
}
# HTTP服务器模块配置
http {
include /etc/nginx/conf/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
# FastCGI 缓存配置
fastcgi_buffers 32 32k; # 增加缓冲区数量和大小
fastcgi_buffer_size 64k; # 增大单个缓冲区大小
# 代理缓存配置
proxy_buffer_size 256k; # 增大单个缓冲区大小
proxy_buffers 8 512k; # 增加缓冲区数量和大小
proxy_busy_buffers_size 512k; # 增大可用缓冲区大小
}
评论