Detailed interpretation of Nginx configuration file content

Here, record the configuration file description of the Nginx server nginx.conf, some comments collection and network. #running user user www-data; #Start the process, usually set to be equal to the number of cpu worker_processes 1; #Global error log and PID file error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; #Working mode and connection limit events { use epoll; #epoll is multiplexed IO(I/O Multiplexing), but only for kernels above linux2.6, can greatly improve the performance of nginx Worker_connections 1024; #Single background worker The maximum number of concurrent connections of the process # multi_accept on; } #Set up the http server, use its reverse proxy function to provide load balancing support http { #Set the mime type, which is defined by the mime.type file include /etc/nginx/mime.types; default_type application/octet-stream; #Set log format access_log /var/log/nginx/access.log; The #sendfile directive specifies whether nginx calls the sendfile function (zero copy method) to output files, for common applications, #Must be set to on, if it is used for downloading and other applications with heavy loads of disk IO, it can be set to off, to balance disk and network I/O processing speed and reduce system uptime. sendfile on; #tcp_nopush on; #Connection timeout #keepalive_timeout 0; keepalive_timeout 65; tcp_nodelay on; #Open gzip compression gzip…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索