Breadcrumbs

 

1. Préambule

- télécharger le package syslog server

 

 

2. Configuration Synology

dans les options du default syslog, il faut activer l'envoi des logs au nouveau syslog server que nous avons installé:

si vous utilisez le syslog du syno, l'IP est 127.0.0.1

syno-syslog1

Il faut ensuite activer tous les filtres:

syno-syslog2

 

3. Apache

3.1.perl script

Create these files in /usr/syno/apache/bin/:

$cat apache_syslog_user_access.pl
#!/usr/bin/perl
use Sys::Syslog qw( :DEFAULT setlogsock );setlogsock("udp");
openlog('apache-user-access', 'ndelay,pid', LOG_LOCAL0);while ($log = ) {
syslog('info', $log);
}
closelog

 

$cat catapache_syslog_error.pl
#!/usr/bin/perl
use Sys::Syslog qw( :DEFAULT setlogsock );setlogsock("udp");
openlog('httpd-error-user', 'ndelay,pid', LOG_LOCAL0);while ($log = ) {
syslog('error', $log);
}
closelog

 

3.2 Configuration Apache

Modify the ErrorLog and CustomLog directives to be:

ErrorLog |/usr/syno/apache/bin/apache_syslog_error.pl

CustomLog |/usr/syno/apache/bin/apache_syslog_user_access.pl combined

 

dans le(s) fichier(s) suivant(s) selon ce que vous voulez logger:

Depending on which apache service you want to show up in your logs, you'll want to modify various apache conf files:
/usr/syno/apache/conf/httpd.conf-sys (pour l'apache systeme)
/usr/syno/apache/conf/httpd.conf-user (pour l'apache serveur webstation)
/usr/syno/apache/conf/httpd.conf
also, if you want to see SSL traffic, be sure to modify:
/usr/syno/apache/conf/extra/httpd-ssl.conf-user
/usr/syno/apache/conf/extra/httpd-ssl.conf-sys

 

 

Source: http://blog.e-nnov.fr/synology-dsm/log-apache/#.U9-KqWPidn0

Source : https://www.synology.com/en-us/support/tutorials/514

Source: http://www.devshed.com/c/a/apache/logging-in-apache/4/

Source: http://forum.synology.com/enu/viewtopic.php?f=180&t=39215

http://syno.haeflinger.com/index.php/DS111

Add comment


Security code
Refresh

Go to Top
Template by JoomlaShine