FastNetMon

Monday 18 January 2010

Расширенный формат лога Nginx для шаред инстанций с большим числом айпи


log_format vhost_ip_full_format '$remote_addr - $remote_user [$time_local] $host $server_addr $request '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" $request_time-$upstream_response_time';


А также корректируем основной лог ngnx - указываем новый формат:

access_log /var/log/nginx/access.log vhost_ip_full_format;


Перезапускаем nginx:
/etc/init.d/nginx reload


(c) alekciy

No comments :

Post a Comment

Note: only a member of this blog may post a comment.