nginx优化-nginx事件处理模型优化use epoll;
生活随笔
收集整理的這篇文章主要介紹了
nginx优化-nginx事件处理模型优化use epoll;
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
性能優化-nginx事件處理模型優化use epoll;
在events區塊中添加
?? use epol;
?
在主配置文件nginx.conf中配置
[root@web01?conf]#?cat?/application/nginx/conf/nginx.conf worker_processes??2; worker_cpu_affinity?01?10; error_log?logs/error.log;#配置Nginx?worker進程最大打開文件數 worker_rlimit_nofile?65535;user?www?www; events?{#單個進程允許的客戶端最大連接數worker_connections??20480;#使用epoll模型use?epoll; } http?{include???????mime.types;default_type??application/octet-stream;sendfile????????on;keepalive_timeout??65;#訪問日志配置log_format??main??'$remote_addr?-?$remote_user?[$time_local]?"$request"?''$status?$body_bytes_sent?"$http_referer"?''"$http_user_agent"?"$http_x_forwarded_for"';#虛擬主機include?/application/nginx/conf/extra/www.conf;include?/application/nginx/conf/extra/blog.conf;include?/application/nginx/conf/extra/bbs.conf;include?/application/nginx/conf/extra/edu.conf;include?/application/nginx/conf/extra/phpmyadmin.conf;include?/application/nginx/conf/extra/status.conf;#隱藏版本號server_tokens?off; }
轉載于:https://blog.51cto.com/13673885/2300282
總結
以上是生活随笔為你收集整理的nginx优化-nginx事件处理模型优化use epoll;的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 学习ASP.NET Core Razor
- 下一篇: 手机没电不用慌 荣耀门店推充电站服务为你