nginx
来源:互联网 发布:农村淘宝电商培训资料 编辑:程序博客网 时间:2024/05/20 18:19
nginx配置
- nginx配置
- 配置文件路径
- 主配置文件结构
- main配置段配置
配置文件路径
/etc/nginx/nginx.conf 或者 /etc/nginx/conf.d/*conf#在/etc/nginx/nginx.conf的配置文件中有一句include /etc/nginx/conf.d/*.conf; 故有/etc/nginx/conf.d/*.conf
主配置文件结构
main block:主配置段,也即全局配置段; event { ... }:事件驱动相关的配置; http { ... }:http/https 协议相关的配置段; mail { ... } stream { ... }#配置文件每行结尾要以;结束 它是类c风格的配置文件
main配置段配置
分类#正常运行必备的配置#优化性能相关的配置#用于调试及定位问题相关的配置#事件驱动相关的配置#正常运行必备的配置user nginx; #nginx运行的用户pid /var/run/nginx.pid; #指定存储nginx主进程进程号码的文件路径load_module modules/ngx_http_geoip_module.so; #载入额外的模块的include file | mask; 载入额外配置文件的#优化性能相关的配置worker_processes number | auto; #指定cpu的处理数目worker_cpu_affinity cpumask ...; cpu的优先级 worker_cpu_affinity auto [cpumask]; CPU MASK: 00000001:0号CPU 00000010:1号CPUworker_priority number #设置worker进程优先级 [-20,20]worker_rlimit_nofile number #worker进程所能打开文件的上限#调试定位daemon on|off #是否以daemon守护进程运行nginxmaster_process on| off 是否以master/worker模型来运行 默认onerror_log file [level] ##事件驱动相关配置events {.....}worker_connections number # 每个worker所能打开的最大并发进程连接数 默认1024use method # 指明并发连接所用的处理方法 比如 use epollaccept_mutex on | off #处理新的连接请求的方法;on意味着由各worker轮流处理新请求,Off意味着每个新请 求的到达都会通知所有的worker进程
0 0
- nginx
- Nginx
- Nginx
- Nginx
- Nginx
- nginx
- nginx
- nginx
- nginx
- nginx
- nginx
- nginx
- nginx
- Nginx
- nginx
- nginx
- nginx
- nginx
- 290. Word Pattern
- 点击按钮一次之后禁用按钮
- Huawei Suite无法在win10上使用问题解决
- lvs
- 移动端多指操作方法封装
- nginx
- Linux下获取进程PID并杀掉进程
- cocos2d-x 如何添加粒子效果
- rsync服务
- PLSQL 複合Trigger 1
- iptables总结
- 从零开始编写简易python爬虫:每日房价的获取
- iptables
- Lucene实践:全文检索的基本原理