logging nginx to syslog on port
vihaan
nginx-forum at nginx.us
Wed Mar 18 14:32:31 UTC 2015
Hi on my local system i have configured rsyslog and nginx.
i want all error logs should to go to syslog over the port no : 10514
my configuration for rsyslog.conf is.:
it is running fine showing no error:, but when i run any page on local host
which is not there, the error are not appearing appaering in out.log
------------------------------------------------------
module(load="imptcp" )
template(name="t" type="string"
string="=====NEW=======\n%msg%\n\n\n%$.foo%\n\n=======END=====\n")
module(load="mmnormalize")
module(load="mmjsonparse")
ruleset(name="r") {
action(type="omfile" name="jj_out_1" file="out.log" template="t")
}
and nginx,cong is configured this way: nginx-1.7.10
-------------------------------------------------------
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request"
'
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
error_log
syslog:server=localhost:10514,facility=local7,tag=nginx,severity=info;
----------------------------------
please help in debugging.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,257388,257388#msg-257388
More information about the nginx
mailing list