1. local syslog


server { 

    listen              80; 

    server_name         syslog.test.co.kr; 

    access_log syslog:server=unix:/dev/log; 

    error_log syslog:server=unix:/dev/log; 

    location /favicon.ico { access_log off; log_not_found off; } 

    root /var/www; 



2. remote syslog


rsyslog 설정


module(load="imudp") 

input(type="imudp" port="514") 



systemctl restart rsyslog



nginx 설정


server { 

    listen              80; 

    server_name         syslog.test.co.kr; 

    access_log syslog:server=10.10.10.10,tag=nginx,severity=info combined; 

    error_log syslog:server=10.10.10.10,tag=nginx,severity=error debug; 

    location /favicon.ico { access_log off; log_not_found off; } 

    root /var/www; 


'오픈소스 > nginx' 카테고리의 다른 글

logstash for nginx  (0) 2018.02.02
nginx log format 정의  (0) 2018.02.02
nginx for beego  (0) 2018.02.02
nginx for http2  (0) 2018.02.02
nginx ssl 설정  (0) 2018.02.02

+ Recent posts