send_rsyslog_from_nginx.conf
· 619 B · Text
Bruto
# add this to http section of nginx.conf
# Sends all virtual hosts access log to rsyslog on my goaccesss machine
log_format vhost_combined '$host $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
access_log syslog:server=66.66.66.66:514,facility=local7,severity=info vhost_combined;
# 66.66.66.66 = replace by IP of GoAccess machine running rsyslogd
# (in my case reachable on 10.x via wireguard tunnel from frontend)
# Make sure all virtual hosts do not have 'access_log off' or any other access log
# as this would override this global line
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 |