syslog integration and fail2ban improvement
This commit is contained in:
@@ -61,8 +61,9 @@ http {
|
||||
# enable/disable sending nginx version
|
||||
server_tokens %SERVER_TOKENS%;
|
||||
|
||||
# where to write logs
|
||||
access_log /var/log/access.log;
|
||||
# write logs to local syslogd
|
||||
access_log syslog:server=unix:/dev/log,nohostname,facility=local0 combined;
|
||||
error_log syslog:server=unix:/dev/log,nohostname,facility=local0,severity=warn;
|
||||
|
||||
# server config
|
||||
include /etc/nginx/server.conf;
|
||||
|
||||
@@ -585,15 +585,15 @@ html_errors = On
|
||||
; Example:
|
||||
;error_log = php_errors.log
|
||||
; Log errors to syslog (Event Log on Windows).
|
||||
;error_log = syslog
|
||||
error_log = syslog
|
||||
|
||||
; The syslog ident is a string which is prepended to every message logged
|
||||
; to syslog. Only used when error_log is set to syslog.
|
||||
;syslog.ident = php
|
||||
syslog.ident = php
|
||||
|
||||
; The syslog facility is used to specify what type of program is logging
|
||||
; the message. Only used when error_log is set to syslog.
|
||||
;syslog.facility = user
|
||||
syslog.facility = local1
|
||||
|
||||
; Set this to disable filtering control characters (the default).
|
||||
; Some loggers only accept NVT-ASCII, others accept anything that's not
|
||||
@@ -605,7 +605,7 @@ html_errors = On
|
||||
; all (all characters)
|
||||
; raw (like "all", but messages are not split at newlines)
|
||||
; http://php.net/syslog.filter
|
||||
;syslog.filter = ascii
|
||||
syslog.filter = ascii
|
||||
|
||||
;windows.show_crt_warning
|
||||
; Default value: 0
|
||||
|
||||
2
confs/syslog.conf
Normal file
2
confs/syslog.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
local0.* /var/log/nginx.log
|
||||
local1.* /var/log/php.log
|
||||
Reference in New Issue
Block a user