Jul 06
- Change language to:
I converted my nginx logformat to make sure I could keep using awstats to record my datatraffic etc. Since I needed to parse half a day of logging through Apache and then later through nginx, I needed to make sure the same formats where used. In Apache I configured the common logformat; which results in the following for nginx:
log_format main ‘$remote_addr - $remote_user [$time_local] “$request” ‘
‘$status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” “$http_x_forwarded_for”‘;
I also created a couple of include files so that standard stuff is included for every vhost, without it requiring me to denote everything (which is quite a lot if you do it properly).

