Skip to content

Instantly share code, notes, and snippets.

@4lun
Created January 19, 2024 15:15
Show Gist options
  • Save 4lun/9a9bd9c3d195d22005216d71ec661b55 to your computer and use it in GitHub Desktop.
Save 4lun/9a9bd9c3d195d22005216d71ec661b55 to your computer and use it in GitHub Desktop.
Nginx server block config lines for piping access_log and error_log to syslog (useful for then getting relayed to papertrail). Source: https://chabik.com/nginx-logging-to-syslog/
access_log syslog:server=unix:/dev/log,tag=nginx,nohostname,severity=info combined;
error_log syslog:server=unix:/dev/log,tag=nginx,nohostname,severity=error;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment