HOWTO Logwatch for Hiawatha on Ubuntu 9 04 Server

Logwatch reads your log files and alert you about the unusual log entries. It is working perfect for Apache. However, the log directory of Hiawatha is different from Apache. You should do something else on logwatch in order to make it to read Hiawatha log files.



Step 0 :



Install logwatch.



sudo apt-get update

sudo apt-get upgrade

sudo apt-get install logwatch




Step 1 :



Make changes to the logwatch configure file in order to tell her to send you a email report.



sudo nano /usr/share/logwatch/default.conf/logwatch.conf



Change the settings of the following lines.



Output = mail

Format = html

MailTo = samiux@gmail.com




Step 2 :



You should also change the setting at the daily cron job.



sudo nano /etc/cron.daily/00logwatch



Make the entry like this.



/usr/sbin/logwatch --mailto samiux@gmail.com



Step 3 :



Make logwatch to read Hiawatha log files.



sudo nano /usr/share/logwatch/default.conf/logfiles/http.conf



Add the following lines on the appropriate sections.



LogFile = hiawatha/*access.log

LogFile = hiawatha/*access.log.1

LogFile = hiawatha/*error.log

LogFile = hiawatha/*error.log.1

LogFile = hiawatha/*system.log

LogFile = hiawatha/*system.log.1

LogFile = hiawatha/*garbage.log

LogFile = hiawatha/*garbage.log.1

LogFile = hiawatha/*php-fcgi.log

LogFile = hiawatha/*php-fcgi.log.1



Archive = hiawatha/*access.log.*.gz

Archive = hiawatha/*error.log.*.gz

Archive = hiawatha/*system.log.*.gz

Archive = hiawatha/*garbage.log.*.gz

Archive = hiawatha/*php-fcgi.log.*.gz




See also (Hiawatha 6.17.1 installation) :

Samiuxs Blog

or

Almost Secure and Perfect Ubuntu Server



Thats all. See you!

Related Posts by Categories

0 komentar:

Posting Komentar