# Incorrect log being generated?

**URL:** <https://www.ruby-forum.com/t/incorrect-log-being-generated/215294>\
**Category:** NGINX\
**Created:** [December 29, 2011, 2:36pm UTC](https://www.ruby-forum.com/t/incorrect-log-being-generated/215294 "2011-12-29T14:36:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [December 29, 2011, 2:36pm UTC](https://www.ruby-forum.com/t/incorrect-log-being-generated/215294/1 "2011-12-29T14:36:04Z")

</div>

Using the following,

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

access_log logs/access.log main;

```

Notice the extra “-”'s…

::ffff:173.175.52.41 - - [29/Dec/2011:07:29:57 -0600] “GET /text.txt  
HTTP/1.1” 200 14457 “-” “Mozilla/5.0 (Windows NT 5.1; rv:8.0)  
Gecko/20100101 Firefox/8.0”  
::ffff:83.108.225.71 - - [29/Dec/2011:07:29:57 -0600] “GET /text.txt  
HTTP/1.1” 200 130968 “-” “Mozilla/5.0 (X11; U; Linux i686; nb-NO;  
rv:1.9.2.18) Gecko/20110628 Ubuntu/10.10 (maverick) Firefox/3.6.18”  
::ffff:31.47.127.66 - - [29/Dec/2011:07:29:57 -0600] “-” 400 0 “-” “-”  
::ffff:81.184.25.193 - - [29/Dec/2011:07:29:57 -0600] “GET /text.txtt  
HTTP/1.1” 200 130968 “-” “Mozilla/5.0 (Windows NT 6.1; rv:8.0)  
Gecko/20100101 Firefox/8.0”  
::ffff:211.128.160.26 - - [29/Dec/2011:07:29:57 -0600] “GET /text.txt  
HTTP/1.1” 200 5068 “-” “Mozilla/5.0 (Windows NT 5.1; rv:2.0)  
Gecko/20100101 Firefox/4.0”  
::ffff:61.5.222.223 - - [29/Dec/2011:07:29:57 -0600] “GET /text.txt  
HTTP/1.1” 200 130968 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64;  
rv:8.0.1) Gecko/20100101 Firefox/8.0.1”  
::ffff:81.182.240.97 - - [29/Dec/2011:07:29:57 -0600] “GET /text.txt  
HTTP/1.1” 200 130968 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0)  
Gecko/20100101 Firefox/8.0”

(nginx compiled)  
nginx version: nginx/1.1.11  
built by gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)  
TLS SNI support enabled  
configure arguments:  
–with-openssl=/root/openssl-1.0.1-stable-SNAP-20111218  
–with-http\_gzip\_static\_module --with-http\_ssl\_module --with-ipv6  
–without-mail\_pop3\_module --without-mail\_imap\_module  
–without-mail\_smtp\_module --without-http\_charset\_module  
–without-http\_ssi\_module --without-http\_userid\_module  
–without-http\_autoindex\_module --without-http\_rewrite\_module  
–without-http\_limit\_zone\_module --without-http\_limit\_req\_module

nginx config: [http://pastebin.com/raw.php?i=k3PWs45H](http://pastebin.com/raw.php?i=k3PWs45H)

Restarting nginx hasn’t helped either. Have I disabled a module or  
haven’t enabled a module I needed?

---

<div class="post-metadata">

**Author:** ![stimpy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/779978/32.png) [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Post date:** [December 29, 2011, 3:08pm UTC](https://www.ruby-forum.com/t/incorrect-log-being-generated/215294/2 "2011-12-29T15:08:48Z")

</div>

I’m just having issues getting awstats to parse the log file being  
generated by nginx

---

<div class="post-metadata">

**Author:** ![stimpy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/779978/32.png) [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Post date:** [December 29, 2011, 3:24pm UTC](https://www.ruby-forum.com/t/incorrect-log-being-generated/215294/3 "2011-12-29T15:24:53Z")

</div>

The logs are showing extra “-”'s, where there should be none? The extra  
“-”  
breaks awstats parsing

---

<div class="post-metadata">

**Author:** ![stimpy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/779978/32.png) [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Post date:** [December 29, 2011, 3:29pm UTC](https://www.ruby-forum.com/t/incorrect-log-being-generated/215294/4 "2011-12-29T15:29:51Z")

</div>

Hello!

On Fri, Dec 30, 2011 at 03:08:11AM +1300, Ryan B. wrote:

> I’m just having issues getting awstats to parse the log file being  
> generated by nginx

I suspect awstats have issues with ipv6 addresses. You may try  
feeding it with the same log lines but with plain ipv4 addresses  
instead to see if it helps.

Maxim D.

> > > ```
> > > '"$http_referer" "$http_user_agent"';
> > > 
> > > ```
> > > 
> > > HTTP/1.1" 200 130968 “-” “Mozilla/5.0 (X11; U; Linux i686; nb-NO;  
> > > rv:8.0.1) Gecko/20100101 Firefox/8.0.1”  
> > > –with-openssl=/root/openssl-1.0.1-stable-SNAP-20111218  
> > > haven’t enabled a module I needed?

---

<div class="post-metadata">

**Author:** ![stimpy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/779978/32.png) [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Post date:** [December 29, 2011, 3:31pm UTC](https://www.ruby-forum.com/t/incorrect-log-being-generated/215294/5 "2011-12-29T15:31:05Z")

</div>

Hello!

On Fri, Dec 30, 2011 at 03:24:08AM +1300, Ryan B. wrote:

> The logs are showing extra “-”'s, where there should be none? The extra “-”  
> breaks awstats parsing

Again: where you see extra “-”'s?

Maxim D.

> > > > Using the following,  
> > > > ::ffff:173.175.52.41 - - [29/Dec/2011:07:29:57 -0600] “GET /text.txt  
> > > > HTTP/1.1” 200 5068 “-” "Mozilla/5.0 (Windows NT 5.1; rv:2.0)  
> > > > nginx version: nginx/1.1.11
> > > 
> > > * * *
> > > 
> > > nginx mailing list  
> > > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > > [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

---

<div class="post-metadata">

**Author:** ![stimpy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/779978/32.png) [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Post date:** [December 29, 2011, 2:43pm UTC](https://www.ruby-forum.com/t/incorrect-log-being-generated/215294/6 "2011-12-29T14:43:29Z")

</div>

Hello!

On Fri, Dec 30, 2011 at 02:35:39AM +1300, Ryan B. wrote:

> ::ffff:211.128.160.26 - - [29/Dec/2011:07:29:57 -0600] "GET /text.txt  
> (nginx compiled)  
> –without-http\_limit\_zone\_module --without-http\_limit\_req\_module
> 
> nginx config: [http://pastebin.com/raw.php?i=k3PWs45H](http://pastebin.com/raw.php?i=k3PWs45H)
> 
> Restarting nginx hasn’t helped either. Have I disabled a module or  
> haven’t enabled a module I needed?

It’s not clear what you are consider to be wrong. Everything  
looks fine and perfectly correct from here.

Maxim D.
