worker_processes auto;
配置error log路径
error_log /data/nginx_logs/error.log warn;
配置access log路径
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 /data/nginx_logs/access.log main;
worker_connections 10240; 需要修改ulimit值,默认1024
vim /etc/security/limits.conf
* soft nofile 65535
* hard nofile 65535
重启生效
原文:https://www.cnblogs.com/kylingx/p/12340653.html