| 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 |
| 11 |
santiago / send_rsyslog_from_nginx.conf
Last active 1 month ago
Revision 5be1ca13b8ba29a6b74c591b98ca0d7da1a190aa