Skip to content

Instantly share code, notes, and snippets.

@brandonsimpson
Created April 23, 2015 05:04
Show Gist options
  • Save brandonsimpson/7363857e73d5eb43c125 to your computer and use it in GitHub Desktop.
Save brandonsimpson/7363857e73d5eb43c125 to your computer and use it in GitHub Desktop.
Nginx multi-host combined access log format

###Nginx multi-host combined access log format

Log multiple hosts with gzip compression and request time data.

From /etc/nginx/nginx.conf:

log_format timed_combined '$remote_addr - $remote_user [$time_local]  '
	'$host "$request" $status $body_bytes_sent '
	'"$http_referer" "$http_user_agent" "$gzip_ratio" ($request_time)';

access_log /var/log/nginx/access.log timed_combined;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment