The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Nginx Logging Format and Awstats

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jared Richardson

Posts: 1031
Nickname: jaredr
Registered: Jun, 2005

Jared Richardson is an author, speaker, and consultant who enjoys working with Ruby and Rails.
Nginx Logging Format and Awstats Posted: May 24, 2008 12:50 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jared Richardson.
Original Post: Nginx Logging Format and Awstats
Feed Title: Agile Artisans
Feed URL: http://agileartisans.com/main/rss
Feed Description: Jared's Blog
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jared Richardson
Latest Posts From Agile Artisans

Advertisement
When I set up my stats I looked around a few times for some examples and never found anything. I finally got mine working recently, so I posted my formats as much for my own reference as anyone else.

First, this web server is nginx. Changing the log format is trivial. My nginx.conf log_format block looks like this:

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


Then awstats has to consume the log. Of course it doesn't use the same configuration language, but it's not too bad. My awstats.conf looks like this:

LogFormat = "%host %time1 %methodurl %code %bytesd %referer" 


No rocket science here, but maybe it'll save you some time figuring it out for yours

Read: Nginx Logging Format and Awstats

Topic: The Art of Delivery, part 2 Previous Topic   Next Topic Topic: Review: Practical REST on Rails 2 Projects

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use