Dec 172010
How to change the nginx log format?
Answer:
Firstly, you need to define a valid log format for nginx, e.g.
log_format foo '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent"';
Then, you need to link that format with your log file:
access_log /var/logs/nginx-test-access.log foo;