santiago revised this gist . Go to revision
1 file changed, 10 insertions
send_rsyslog_from_nginx.conf(file created)
| @@ -0,0 +1,10 @@ | |||
| 1 | + | # add this to http section of nginx.conf | |
| 2 | + | # Sends all virtual hosts access log to rsyslog on my goaccesss machine | |
| 3 | + | ||
| 4 | + | log_format vhost_combined '$host $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"'; | |
| 5 | + | access_log syslog:server=66.66.66.66:514,facility=local7,severity=info vhost_combined; | |
| 6 | + | ||
| 7 | + | # 66.66.66.66 = replace by IP of GoAccess machine running rsyslogd | |
| 8 | + | # (in my case reachable on 10.x via wireguard tunnel from frontend) | |
| 9 | + | # Make sure all virtual hosts do not have 'access_log off' or any other access log | |
| 10 | + | # as this would override this global line | |
Newer
Older