首页 > 其他 > 详细

Nginx核心模块

时间:2018-01-18 11:28:08      阅读:218      评论:0      收藏:0      [点我收藏+]

error_log

语法:error_log file [ debug | info | notice | warn | error | crit ]
默认值:${prefix}/logs/error.log
指定Nginx服务(与FastCGI)错误日志文件位置。
每个字段的错误日志等级默认值:

1.main字段-error,2.HTTP字段-crit,3.server字段-crit

关闭日志功能:error_log /dev/null crit;

include

语法:include file | *
默认值:none
你可以包含一些其他的配置文件来完成你想要的功能。
0.4.4版本以后,include指令已经能够支持文件通配符:

include vhosts/*.conf

注意:文件的相对路径是根据nginx.conf所在目录决定

try_file

location / {
  try_files $uri $uri/ @drupal;
}

以项目根路径$document_root为根目录,判断$document_root/$uri,$document_root/$uri/是否存在,不存在则重定向至@drupal

worker_processes

理论最大连接数(max_clients) = worker_processes * worker_connections

反向代理最大连接数(max_clients) = worker_processes * worker_connections/4

Nginx核心模块

原文:https://www.cnblogs.com/kerwing/p/8309010.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!