nginx的log

access_log的最小作用域是location,关闭方式是:access_log off;

error_log的最小作用域是http,关闭方式是:error_log /dev/null;

如果一个请求是404之类的,则access_log中记录404,error_log同时会记录open filename failed等错误,如果不需要,可以改变http域error_log的记录等级,也可以直接关闭(还有log_not_found选项可以关闭记录open filename failed错误)。

This entry was posted in nginx, 运维 and tagged , , , . Bookmark the permalink.

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

Note: If you are replying to another commenter, click the "Reply to {NAME} ↵" button under their comment!