deleted log file - how to make a new one?

Discussion in 'Site & Server Administration' started by richard3i, Apr 9, 2007.

  1. #1
    I had some files removed from my /usr/local/apache/domlogs and one of them was my log file with stats on it (domainexample.org), now awstats and webalizer wont update. Is there a way to make a new file with nothing in it so awstats and webalizer will start updating again?
     
    richard3i, Apr 9, 2007 IP
  2. eddy2099

    eddy2099 Peon

    Messages:
    8,028
    Likes Received:
    568
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Technically speaking, logs will be automatically created if it is not there. So if you delete the right files, it would come back again. Give it at least 24 to 48 hours before running awstats and webalizer again. This will give it enough time to generate new log files and populate it.
     
    eddy2099, Apr 9, 2007 IP
  3. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Restart the server few times until the kernel is fixed(usually if you delete ALL files, few kernel issues pop up)

    So, it'll take about a day at least to show up the stats after the restart
     
    inworx, Apr 10, 2007 IP
  4. Thibaut

    Thibaut Well-Known Member

    Messages:
    886
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Hello,

    simply restart Apache.

    regards
    Thibaut
     
    Thibaut, Apr 10, 2007 IP
  5. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #5
    use this command to restart apache by ssh - service httpd restart

    or simply restart the whole server by an easy command - reboot
     
    inworx, Apr 10, 2007 IP
  6. rootbinbash

    rootbinbash Peon

    Messages:
    2,198
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    0
    #6
    #touch /home/asdasd/asdasd.txt

    or whatever
     
    rootbinbash, Apr 10, 2007 IP
  7. sgugal

    sgugal Peon

    Messages:
    183
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Restart Apache and Run Weblogs ..
     
    sgugal, Apr 10, 2007 IP