# Webalizer + nginx

**URL:** <https://www.ruby-forum.com/t/webalizer-nginx/187985>\
**Category:** NGINX\
**Created:** [May 3, 2010, 7:04pm UTC](https://www.ruby-forum.com/t/webalizer-nginx/187985 "2010-05-03T19:04:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gloomen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e8c25b/32.png) [@gloomen](https://www.ruby-forum.com/u/gloomen)\
**Post date:** [May 3, 2010, 7:04pm UTC](https://www.ruby-forum.com/t/webalizer-nginx/187985/1 "2010-05-03T19:04:53Z")

</div>

[QUOTE=mitsumoto;80948]Hello All!

Help me please.  
Which format should be used to log in nginx Webalizer?  
I get inflated statistics

```auto
    log_format main '$remote_addr - $remote_user [$time_local] 
"$request" '
                        '$status $body_bytes_sent "$http_referer" '
                        '"$http_user_agent" "$http_x_forwarded_for"';
```

```auto
#virtual host
    server {
        listen 80;
        server_name example.ru;
        access_log /var/log/nginx.access_log main;

        charset windows-1251;
        client_max_body_size 4m;

        location / {
            root /usr/local/www/example.ru;
            index index.html index.php;
        }

    }
```

Thanks[/QUOTE]

Posted at Nginx Forum:

> **[Webalizer + nginx](https://forum.nginx.org/read.php?2,82125,82125#msg-82125)**
>
> \[QUOTE=mitsumoto;80948\]Hello All! Help me please. Which format should be used to log in nginx Webalizer? I get inflated statistics \[code\] log\_format main '$remote\_addr - $remote\_user \[$time\_local\] "$request" '

---

<div class="post-metadata">

**Author:** ![gloomen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e8c25b/32.png) [@gloomen](https://www.ruby-forum.com/u/gloomen)\
**Post date:** [May 4, 2010, 10:56am UTC](https://www.ruby-forum.com/t/webalizer-nginx/187985/2 "2010-05-04T10:56:33Z")

</div>

Hi gloomen,

I think you need to log each virtual server to a different log file.

What I suspect is happening is that that log file is getting logs from  
other virtual servers  
or the main server, and that is inflating your figures.

And I don’t think your log\_format command is necessary either. I don’t  
have a log\_format command  
and webalizer works just fine.

Regards

Ian

---

<div class="post-metadata">

**Author:** ![gloomen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e8c25b/32.png) [@gloomen](https://www.ruby-forum.com/u/gloomen)\
**Post date:** [May 4, 2010, 1:48pm UTC](https://www.ruby-forum.com/t/webalizer-nginx/187985/3 "2010-05-04T13:48:39Z")

</div>

Thank you.

Posted at Nginx Forum:

> **[Re: Webalizer + nginx](https://forum.nginx.org/read.php?2,82125,82404#msg-82404)**
>
> \[QUOTE=mitsumoto;80948\]Hello All! Help me please. Which format should be used to log in nginx Webalizer? I get inflated statistics \[code\] log\_format main '$remote\_addr - $remote\_user \[$time\_local\] "$request" '
