求救!!关不了NGINX 的ACCESS_LOG
/usr/local/nginx/logs 下面的access_log文件非常大我在nginx.conf下增加了access_log off,重新加载了配置文件,还是继续疯狂增长!
是要在每个VHOST下增加这个参数? 在other.conf加了access_log 也没用,求救军哥 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 ilovejunge:L 能解决实际问题么。。。
回复 5# 的帖子
https://bbs.vpser.net/thread-3066-1-1.html 依然没用。。。。。。回复 7# 的帖子
那就没办法了 楼主用NGINX是什么版本呢,我安装完LNMP后直接升级为1.0.2然后注销掉默认的,直接改为access_log off;
重启,这步很关键,也必须
/etc/init.d/nginx stop
/etc/init.d/nginx start
为了检验结果
你可以
rm -f/home/wwwlogs/*.log
然后再重启。
我想应该可以解决你的问题
页:
[1]