main
daemon on/off;
debug_points abort | stop;
env MALLOC_OPTIONS; 保留環(huán)境變量
env PERL5LIB=/data/site/modules;
env OPENSSL_ALLOW_PROXY_CERTS=1;
events
error_log file [level]; 適用main, http, mail, stream, server, location
include 適用任意上下文
load_module
lock_file 用于實(shí)現(xiàn)上述的accpet_mutex
master_process on/off;
pcre_jit 可加快正則類url的匹配
pid logs/nginx.pid;
ssl_engine device; 設(shè)置ssl加速器
thread_pool default threads=32 max_queue=65536;
timer_resolution 100ms;
user nobody nobody;
worker_cpu_affinity auto [cpumask];
worker_priority 0;
worker_processes 1;
worker_rlimit_core size; 工作進(jìn)程最大核心文件大小
worker_rlimit_nofile number; 工作進(jìn)程打開的最大文件數(shù)量
worker_shutdown_timeout time;
working_directory directory; 工作路徑
events
accept_mutex on/off; 【worker進(jìn)程輪流接收連接澄步,默認(rèn)否】
accept_mutex_delay 500ms;
debug_connection 127.0.0.1; 針對(duì)特定地址來(lái)啟用詳細(xì)日志
use method;
multi_accept on/off;
worker_aio_requests 32;
worker_connections 512;