Ship It! LIVEShip It! LIVE
home about services writing contact

We develop, test, and create fine software products, and design creative solutions to your problems.
The development of software is an intrinsically creative process. We are dedicated to improving our mastery of the art.
Links · RSS Feed
Popular Pages

They have gathered together the ‘best bits’ of various styles and methodologies they have been directly involved with, and combined them into a practical approach with the focus on delivering a pro...
-Mitch Wheat
..."Ship It!" is in the style of the other Pragmatic books and is an easy and focused read. I finished it in two days and have already gained a wealth of insight that I can apply immediately. Hig...
-Anil John
Quoting Watts Humphrey, "Developers are caught in a victim's mentality." We never think it's our fault, it's always somebody else's.
-Jared Richardson

Nginx Logging Format and Awstats (May 24)
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 yourself. I haven't run this format long enough to be sure I won't add something to it. If I do, I'll update here.

Quick update, I forgot to add, to get nginx to re-read the config files on the fly, use this:
kill -HUP 1234
where 1234 is your pid. You can have nginx recreate the log files (if you've moved them during your debugging cycle) with
kill -USR1 1234

I pulled the quotes from the return code. doh!

Category: Misc

New England Software Symposium (2008-09-12)
Back in Boston! I'll be speaking on Saturday and Sunday.
Pacific Northwest Software Symposium (2008-09-19)
Back on the west coast. I'll speak (and keynote) on Friday and Saturday in Redmond.
Agile Development Practices (2008-11-10)
Any conference in Orlando is good, but this one is great!
Agile One: Boston (2008-11-18)
The first Agile Experience was a huge success. Tell your manager about this one.


© 2007 Agile Artisans.