nginx不记录指定文件类型的日志
不記錄指定文件類型的日志
server{
??? listen 80;
??? server_name www.test1.com www.aaa1.com www.bbb1.com;
??? if ($host != 'www.test1.com')
????? {
?? rewrite ^/(.*)$ http://www.test1.com/$1 permanent;
???? }
??? index index.html index.htm index.php;
??? root /data/www;
???? access_log /tmp/access.log 123456;
??? location ~ .*admin\.php$ {
?????? auth_basic "123123 auth";
????? auth_basic_user_file /usr/local/nginx/conf/.htpasswd;
include fastcgi_params;
??????? fastcgi_pass unix:/tmp/www.sock;
??????? fastcgi_index index.php;
??????? fastcgi_param SCRIPT_FILENAME /data/www$fastcgi_script_name;
}
???location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$
?????? {
??? access_log off;
??? }
?? location ~ (static|cache)$
?????? {
??? access_log off;
??? }
????
?? location ~ \.php$ {
??????? include fastcgi_params;
??????? fastcgi_pass unix:/tmp/www.sock;
??????? fastcgi_index index.php;
??????? fastcgi_param SCRIPT_FILENAME /data/www$fastcgi_script_name;
??? }
}本文轉自 boy461205160 51CTO博客,原文鏈接:http://blog.51cto.com/461205160/1735419
總結
以上是生活随笔為你收集整理的nginx不记录指定文件类型的日志的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 01-MPLS产生的背景/以及和其他技术
- 下一篇: 文件或目录权限chmod,更改所有者和所