Spyderserve Web Development

rsyslog.conf Setup

Modify /etc/rsyslog.conf file and add the following at the end:

*.* @[ip address of remote server]:[port]

  • Port number is optional.  Default is 514.

httpd.conf Setup (Apache)

Modify /etc/httpd/conf/httpd.conf file and add the following:

ErrorLog syslog:local1

CustomLog “| /usr/bin/logger -t httpd -p local1.info” [log format]

Now restart both Apache and rsyslog

service httpd restart

service rsyslog restart

Now your logs should be going both to the local machine and to the remote logging server.

Sources:

http://www.freeklijten.nl/home/2011/08/16/A-tutorial-on-remote-logging-with-rsyslog
http://wiki.rsyslog.com/index.php/Working_Apache_and_Rsyslog_configuration
Spyderserve  2225 Bemiss Road Suite D Valdosta, Georgia 31602 United States