homepage Welcome to WebmasterWorld Guest from 54.205.247.203
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

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




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

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

 

incrediBILL




msg:4433748
 12:59 am on Mar 27, 2012 (gmt 0)

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.

basketmen




msg:4433756
 1:37 am on Mar 27, 2012 (gmt 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

Key_Master




msg:4433758
 1:50 am on Mar 27, 2012 (gmt 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
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved