加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
nginx.conf 741 Bytes
一键复制 编辑 原始数据 按行查看 历史
Eric Ling 提交于 2024-03-19 20:04 . nginx负载均衡
user nginx;
# Sets the number of worker processes automatically based on the number of CPU cores.
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
# maximum number of simultaneous connections that each worker process can handle.
worker_connections 1024;
}
stream {
log_format proxy '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time "$upstream_addr" '
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
access_log /var/log/nginx/tcp-access.log proxy ;
open_log_file_cache off;
include /etc/nginx/tcp.d/*.conf;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化