全球主机交流论坛

标题: Nginx 關閉日誌...有問題? [打印本页]

作者: bluesky    时间: 2009-7-28 09:09
标题: Nginx 關閉日誌...有問題?
幫忙看一下,語法哪裡錯了?
我的 access_log ... 持續肥大中


#location /status {
                #stub_status    on;
                #access_log     off;
                #}

                location ~ .*\.(php|php5)?$
                        {
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                #fastcgi_pass  127.0.0.1:9000;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }

                location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }

                location ~ .*\.(js|css)?$
                        {
                                expires      12h;
                        }

                log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $http_x_forwarded_for';
                access_log  /web/logs/access.log  access;
              access_log /dev/null;
              error_log /dev/null;
        }

作者: cpuer    时间: 2009-7-28 09:10
标题: 回复 1# 的帖子
当然可以关啦,空间不够大的话可以关掉省事。
作者: bluesky    时间: 2009-7-28 09:11
原帖由 cpuer 于 2009-7-28 09:10 发表
当然可以关啦,空间不够大的话可以关掉省事。

log檔...繼續增胖中...關不掉辣
作者: cpuer    时间: 2009-7-28 09:15
原帖由 bluesky 于 2009-7-28 09:11 发表

log檔...繼續增胖中...關不掉辣


修改nginx.conf 找到access_log:

access_log /dev/null;
error_log /dev/null;

这样全部把他们丢到系统的黑洞里了


作者: cpuer    时间: 2009-7-28 09:16
标题: 回复 4# 的帖子
然后记得reload nginx配置参数配置文件。
作者: bluesky    时间: 2009-7-28 09:19
原帖由 cpuer 于 2009-7-28 09:15 发表
修改nginx.conf 找到access_log:

access_log /dev/null;
error_log /dev/null;

这样全部把他们丢到系统的黑洞里了


加進去了
一樓是我目前的語法
log...持續肥大中
作者: cpuer    时间: 2009-7-28 09:20
原帖由 bluesky 于 2009-7-28 09:19 发表

加進去了
一樓是我目前的語法
log...持續肥大中


access_log  /web/logs/access.log  access;
access_log /dev/null;
error_log /dev/null;

你这写了有问题啊

access_log 怎么有2个路径啊,access_log  /web/logs/access.log  access; 这个咔嚓掉
作者: bluesky    时间: 2009-7-28 09:23
原帖由 cpuer 于 2009-7-28 09:20 发表
access_log  /web/logs/access.log  access;
access_log /dev/null;
error_log /dev/null;

你这写了有问题啊

access_log 怎么有2个路径啊,access_log  /web/logs/access.log  access; 这个咔嚓掉 ...

log檔,長胖10mb了
我把它咔嚓掉看看
燒等~
作者: cpuer    时间: 2009-7-28 09:25
原帖由 bluesky 于 2009-7-28 09:23 发表

log檔,長胖10mb了
我把它咔嚓掉看看
燒等~



作者: bluesky    时间: 2009-7-28 09:30
OK辣...迷變胖了...順手把log也砍掉

問...一鍵包裝完後
根目錄下有個 phpinfo.php 可不可以咔嚓掉?
作者: cpuer    时间: 2009-7-28 09:32
原帖由 bluesky 于 2009-7-28 09:30 发表
OK辣...迷變胖了...順手把log也砍掉

問...一鍵包裝完後
根目錄下有個 phpinfo.php 可不可以咔嚓掉?



那个只是个探针,可以删除的。
作者: bluesky    时间: 2009-7-28 09:35
原帖由 cpuer 于 2009-7-28 09:32 发表



那个只是个探针,可以删除的。

嗯.嗯..謝老大
有事來奏,無事退朝 ... 小臣..退
作者: cpuer    时间: 2009-7-28 09:36
原帖由 bluesky 于 2009-7-28 09:35 发表

嗯.嗯..謝老大
有事來奏,無事退朝 ... 小臣..退







欢迎光临 全球主机交流论坛 (https://hostloc.9hanju.com/) Powered by Discuz! X3.4