Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.