Skip to content

Instantly share code, notes, and snippets.

@podolinek
Forked from fprochazka/nginx.conf
Created October 27, 2018 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save podolinek/e91ad6fb3f31397634a844006a6aa761 to your computer and use it in GitHub Desktop.
Save podolinek/e91ad6fb3f31397634a844006a6aa761 to your computer and use it in GitHub Desktop.
error_log syslog:server=unix:/var/log/nginx.sock;
http {
log_format verbose '$remote_addr - $remote_user $host "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
map $status $loggable {
~^[2] 0;
default 1;
}
map $scheme $server_https {
default off;
https on;
}
access_log syslog:server=unix:/var/log/nginx.sock verbose if=$loggable;
}
$AddUnixListenSocket /var/log/nginx.sock
# access log
$InputFileName /var/log/nginx/access.log
$InputFileTag nginx:
$InputFileStateFile stat-nginx-access
$InputFileSeverity notice
$InputFileFacility local6
$InputFilePollInterval 1
$InputRunFileMonitor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment