Welcome! Log In Create A New Profile

Advanced

Migrating from Apache - Logging to rsyslog

Posted by peterh 
Migrating from Apache - Logging to rsyslog
February 17, 2012 11:36AM
Hi,

I would like to migrate some of our current solution from apache to nginx.
We have Ubuntu LTS 10.04 servers with the official nginx repo installation of nginx which is version 1.0.12-1.
I have these lines in apache vhost file:

ErrorLog /var/log/apache2/servername.error.log
ErrorLog "|/usr/bin/logger -p local6.warn -t httpd_servername"

CustomLog /var/log/apache2/servername.access.log combined
CustomLog "|/usr/bin/logger -p local6.info -t httpd_servername" combined

Our whole centralized logging system with rsyslog setup with filters on the incoming log messages so I would like to achieve somehow the same results with nginx as well.

So I want to keep logs on the local server and for security, redundancy purposes I would like to send them to syslog tagged as I do with apache as well.

Could you help me with this issue, I would prefer to send the logs through logger as i do now I am not really keen on totally change the method.
I've found some solution with the rsyslog imfile option but still would be better to on logger way.

Anybody has any experiance on this.

Thank you
Peter
Re: Migrating from Apache - Logging to rsyslog
June 21, 2012 07:12AM
i'm very interested in it too, because the only one solution i found, is to monitor nginx log:

http://wiki.loggly.com/nginxlogging
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready