VPS侦探论坛

 找回密码
 注册
查看: 10435|回复: 8

求救!!关不了NGINX 的ACCESS_LOG

[复制链接]
发表于 2011-5-22 09:58:32 | 显示全部楼层 |阅读模式

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

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

是要在每个VHOST下增加这个参数?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-5-22 10:17:05 | 显示全部楼层


在other.conf加了access_log 也没用,求救军哥
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-5-22 10:17:59 | 显示全部楼层

  1. user www www;

  2. worker_processes 8;

  3. error_log /home/wwwlogs/nginx_error.log crit;

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

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

  7. events
  8. {
  9. use epoll;
  10. worker_connections 65535;
  11. }

  12. http
  13. {
  14. include mime.types;
  15. default_type application/octet-stream;

  16. server_names_hash_bucket_size 128;
  17. client_header_buffer_size 32k;
  18. large_client_header_buffers 4 32k;
  19. client_max_body_size 8m;

  20. sendfile on;
  21. tcp_nopush on;

  22. keepalive_timeout 60;

  23. tcp_nodelay on;

  24. fastcgi_connect_timeout 300;
  25. fastcgi_send_timeout 300;
  26. fastcgi_read_timeout 300;
  27. fastcgi_buffer_size 64k;
  28. fastcgi_buffers 4 64k;
  29. fastcgi_busy_buffers_size 128k;
  30. fastcgi_temp_file_write_size 256k;

  31. gzip on;
  32. gzip_min_length 1k;
  33. gzip_buffers 4 16k;
  34. gzip_http_version 1.0;
  35. gzip_comp_level 2;
  36. gzip_types text/plain application/x-javascript text/css application/xml;
  37. gzip_vary on;

  38. #limit_zone crawler $binary_remote_addr 10m;
  39. server
  40. {
  41. listen 80;
  42. server_name xxx.xxx.cn;
  43. index index.html index.htm index.php;
  44. root /home/wwwroot;

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

  51. location /status {
  52. stub_status on;
  53. access_log off;
  54. }

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

  59. location ~ .*\.(js|css)?$
  60. {
  61. expires 12h;
  62. }
  63. access_log /dev/null;
  64. }
  65. include vhost/*.conf;
  66. }
复制代码



上面是我的nginx.conf
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-5-22 10:24:16 | 显示全部楼层



ilovejunge
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-5-23 14:18:29 | 显示全部楼层

能解决实际问题么。。。

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-5-23 15:16:34 | 显示全部楼层
 楼主| 发表于 2011-5-23 21:24:53 | 显示全部楼层

依然没用。。。。。。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-5-23 22:12:36 | 显示全部楼层

回复 7# 的帖子


那就没办法了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 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
然后再重启。
我想应该可以解决你的问题

军哥运维代购:http://shop63846532.taobao.com/

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-20 14:59 , Processed in 0.027530 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表