nginx 虚拟主机里面多个location的log不生成日志

独占默默 发布于 2014/07/11 22:27
阅读 2K+
收藏 0

vhost.conf

server {

listen       80;
        server_name  aa.bb.com;
        index index.html index.htm index.php;
        root  /data/nginx/aa.bb.com/webroot;

location = /favicon.ico {
                log_not_found off;
        }
        location / {
                index index.php index.html index.htm;
                try_files $uri $uri/ /index.php$is_args$args;
        }

location /cc/ {
                        index index.php index.html index.htm;
                        try_files $uri $uri/ /cc/index.php$is_args$args;
                        access_log  /data/nginxlogs/aa.bb.com-cc-aceess.log test buffer=32k;
        }

        location /dd/ {
                        index index.php index.html index.htm;
                        try_files $uri $uri/ /ddd/index.php$is_args$args;
                        access_log  /data/nginxlogs/aa.bb.com-ddd-aceess.log main;
        }

......此处还有五个类似的location

 error_log  /data/nginxlogs/aa.bb.com-error.log;
        access_log  /data/nginxlogs/aa.bb.com-aceess.log main;

}

在nginx.conf文件中记录的log_format

og_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                         '"$status" $body_bytes_sent "$http_referer" '
                         '"$http_user_agent" "$http_x_forwarded_for" '
                         '"$gzip_ratio" $request_time $bytes_sent $request_length';

问题:

网站是有人在不停的访问,在server(/data/nginxlogs/aa.bb.com-aceess.log)层的日志有输出

在location里面的所有日志都没有生成访问日志,求解决




加载中
0
红叔
红叔
server层的日志中包含location的日志么?
独占默默
独占默默
location的访问日志有在server层的log里面出现
返回顶部
顶部