Welcome to WebmasterWorld Guest from 23.22.140.143

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Can i get email notification each time error log added/increase?So faster to response

     
12:28 am on Mar 27, 2012 (gmt 0)

Junior Member

5+ Year Member

joined:May 17, 2007
posts: 101
votes: 0


Can i get email notification each time error_log added/increase?So faster to response
12:59 am on Mar 27, 2012 (gmt 0)

Administrator from US 

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 25, 2005
posts:14624
votes: 88


Probably not in Apache itself.

However, you could set a cron job that executes every 1-5 minutes and calls a script that checks to see if error_log has changed and send an email if it has.

Not sure I'd want this because if a bad bot hits your site testing vulnerabilities it can easily clutter up error_log with errors that don't really exist and send a lot of worthless email in a hurry.
1:37 am on Mar 27, 2012 (gmt 0)

Junior Member

5+ Year Member

joined:May 17, 2007
posts: 101
votes: 0


can anyone give me the cron job command example for this please

no problem with a lot of emails, we can disable and enable the cron anytime temporary if needed
1:50 am on Mar 27, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 27, 2001
posts:1472
votes: 0


You can use the ErrorDocument directive to redirect error responses to a script that generates an error page and also sends the admin an E-mail. E.g.:

ErrorDocument 500 /email-error.php