# Webalizer + nginx



## mitsumoto (May 3, 2010)

Hello All!

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


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


```
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


----------



## allanjude@ (May 20, 2010)

What leads you to believe the statistics you are getting are inflated?

the Apache 'combined' log format is the same as what you have defined, except without the "$http_x_forwarded_for" at the end.

The only thing I can think of is the log rotation, if the logs files are being re-read each time webalizer runs, when it expects them to be purged after it runs.


----------

