Skip to content

Instantly share code, notes, and snippets.

@ricsiga
Last active July 5, 2024 21:41
Show Gist options
  • Save ricsiga/0781e545487c976a17a5d0147f1da1e8 to your computer and use it in GitHub Desktop.
Save ricsiga/0781e545487c976a17a5d0147f1da1e8 to your computer and use it in GitHub Desktop.
add hostname to nginx access.log
log_format vhost '$host - $remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $request_time';
access_log /var/log/nginx/access.log vhost;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment