nginx ignores faviconico logs favicon.ico 404 online favicon favicon 1 htm disease

WBOY
Release: 2016-07-29 08:54:15
Original
1745 people have browsed it

Note:
favicon.ico takes up a lot of information in the nginx error_log log, covering the logs we really need to view. So here, we turn it off via log_not_found off.
favicon,favicon.ico是什么,favicon.ico下载,favicon图标,favicon.ico图标,favicon.ico尺寸,favicon在线制作,favicon.ico不显示,favicon.ico制作,favicon.ico代码,favicon是什么意思,favicon.ico 在线,favicon.ico 404,在线favicon,favicon 1 htm病
Implementation:
//Put the following configuration into the server {} block, and turn off logging when favicon.ico does not exist

<span>location </span><span>=</span><span>/favicon.ico {
log_not_found off;
access_log off;
}
/</span><span>/</span><span>log_not_found on</span><span>|</span><span>off</span><span>,默认为</span><span>on</span><span>:启用或禁用</span><span>404</span><span>错误日志,这个指令可以用来禁止</span><span>nginx</span><span>记录找不到</span><span>rebots</span><span>.</span><span>txt</span><span>或</span><span>favicon</span><span>.</span><span>ico</span><span>这类文件的错误信息。</span>
Copy after login


Appendix:
1. I saw a sentence on the Internet saying: Note that error_log off does not close the log Logging function, it writes the log file to a file named off. If you want to turn off the error logging function, you should use the following configuration: error_log /dev/null crit;
off location is /usr/local/nginx/ off, that is, in the installation directory of nginx

2. Changing log_not_found off to error_log off has the same effect. The difference is that writing error_log off outputs the error log to the off file, while log_not_found closes the log.

Reprinted from: http://coolnull.com/1516.html

The above introduces nginx to ignore the faviconico log, including favicon and iconic content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!