nginx 全局配置
生活随笔
收集整理的這篇文章主要介紹了
nginx 全局配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
nginx 全局配置
#user nobody; # user 主模塊 ,指定nginx worker 進程的運行用戶組 worker_processes 1; # worker_processes 開啟進程數 每個nginx進程平均消耗 10-12內存 (CPU 和內核進程數一樣)#error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; # error_log 日志輸出級別 ;有 debug info notice warn error crit#pid logs/nginx.pid;#Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 65535; # worker_rlimit_nofile nginx進程打開的最多文件描述符數目 65535 (ulimit -n 65535 設置)events { use epoll; worker_connections 1024; }events {
use epoll;
worker_connections 1024;
}
// events 設置工作模式和設置連接數;
// 默認是 use epoll;
// 指定nginx的工作模式標準和高效模式:select Poll 標準 和 kqueue epoll rtsig /dev/poll高效)
worker_connections 65535;
// 事件模塊,定義內個進程的最大連接數;
// 最大客戶端的鏈接數一般由 worker_processes 和 worker_connections 決定的;max_clinet = worker_processes* worker_connections
// 在作為反向代理時變為 max client =worker_processes*worker_connections/4
?
轉載于:https://www.cnblogs.com/sharesdk/p/7851069.html
總結
以上是生活随笔為你收集整理的nginx 全局配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 转: MinGw离线安装方法集合
- 下一篇: Node.js的环境搭建