The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Create Cron Job to email the Raw Access Log every day

Discussion in 'E-mail Discussions' started by inukshuk, Feb 20, 2002.

  1. inukshuk

    inukshuk Registered

    Joined:
    Feb 20, 2002
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    my website is hosted on a webserver using Cpanel 3 and I want to automaticaly email the access log to someone.

    Is it possible to do that via the cron jobs ?

    Thank for your help.
     
  2. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    echo &mail admin@yourhost.com & /usr/local/apache/logs/access_log& & /etc/cron.daily/email_access_log
    chmod 0700 /etc/cron.daily/email_access_log

    **Warning** I'm not sure what a huge access log would do to the performance of the server. For all i know a 2gig access_log could crash it. Use this at your own Risk

    :p

    Also this wont attach the access log. The email will be the access log. I dont beleive their is a easy way to attach files. I could be wrong.
     
Loading...

Share This Page