ilovejunge 发表于 2011-5-22 09:58:32

求救!!关不了NGINX 的ACCESS_LOG

/usr/local/nginx/logs 下面的access_log文件非常大

我在nginx.conf下增加了access_log off,重新加载了配置文件,还是继续疯狂增长!

是要在每个VHOST下增加这个参数?

ilovejunge 发表于 2011-5-22 10:17:05

在other.conf加了access_log 也没用,求救军哥

ilovejunge 发表于 2011-5-22 10:17:59

user www www;

worker_processes 8;

error_log /home/wwwlogs/nginx_error.log crit;

pid /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 65535;

events
{
use epoll;
worker_connections 65535;
}

http
{
include mime.types;
default_type application/octet-stream;

server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 8m;

sendfile on;
tcp_nopush on;

keepalive_timeout 60;

tcp_nodelay on;

fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;

gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;

#limit_zone crawler $binary_remote_addr 10m;
server
{
listen 80;
server_name xxx.xxx.cn;
index index.html index.htm index.php;
root /home/wwwroot;

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

location /status {
stub_status on;
access_log off;
}

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

location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log /dev/null;
}
include vhost/*.conf;
}


上面是我的nginx.conf

licess 发表于 2011-5-22 10:24:16

ilovejunge:L

ilovejunge 发表于 2011-5-23 14:18:29

能解决实际问题么。。。

licess 发表于 2011-5-23 15:16:34

回复 5# 的帖子

https://bbs.vpser.net/thread-3066-1-1.html

ilovejunge 发表于 2011-5-23 21:24:53

依然没用。。。。。。

licess 发表于 2011-5-23 22:12:36

回复 7# 的帖子

那就没办法了

alist 发表于 2011-5-24 12:16:30

楼主用NGINX是什么版本呢,我安装完LNMP后直接升级为1.0.2然后注销掉默认的,直接改为
access_log off;
重启,这步很关键,也必须

/etc/init.d/nginx stop
/etc/init.d/nginx start
为了检验结果
你可以
rm -f/home/wwwlogs/*.log
然后再重启。
我想应该可以解决你的问题
页: [1]
查看完整版本: 求救!!关不了NGINX 的ACCESS_LOG