Problems with generating AWStats logs

Discussion in 'Installation/Configuration' started by Mannekino, Jun 7, 2012.

  1. Mannekino

    Mannekino New Member

    Hello,

    I was doing some checking and cleanup of my server and I noticed some mail in /var/mail/www-data. I checked the contents of these messages and found a bunch of AWStats errors like these:

    Code:
    Create/Update database for config "/etc/awstats/awstats.www.example.com.conf" by AWStats version 6.95 (build 1.943)
    >From data in log file "/var/log/ispconfig/httpd/www.example.com/yesterday-access.log"...
    Error: Couldn't open server log file "/var/log/ispconfig/httpd/www.example.com/yesterday-access.log" : No such file or directory
    Setup ('/etc/awstats/awstats.www.example.com.conf' file, web server or permissions) may be wrong.
    Check config file, permissions and AWStats documentation (in 'docs' directory).
    Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
    Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
    Check config file, permissions and AWStats documentation (in 'docs' directory).
    
    I went to check on the first error. I looked into the directory of the log file location.

    Code:
    user@host:/var/log/ispconfig/httpd/www.example.com$ ls -alh
    total 148K
    drwxr-xr-x 2 root  root    4.0K 2012-05-10 00:30 .
    drwxr-xr-x 9 root  root    4.0K 2012-03-24 17:45 ..
    lrwxrwxrwx 1 root  root      19 2012-04-09 02:37 access.log -> 20120409-access.log
    -rw-r--r-- 1 web11 client5 136K 2012-04-09 17:08 error.log
    lrwxrwxrwx 1 root  root      54 2012-04-11 00:30 yesterday-access.log -> /var/www/clients/client5/web11/log/20120409-access.log
    So I followed the symbolic link and checked that directory. And I found that it loops back to the previous directory. So it seems there is something wrong with the way the directories are created?

    Code:
    user@host:/var/www/clients/client5/web11$ ls -alh
    total 24K
    drwxr-xr-x 6 root  root    4.0K 2012-03-24 17:45 .
    drwxr-xr-x 4 root  root    4.0K 2012-03-24 17:45 ..
    drwxr-xr-x 2 web11 client5 4.0K 2012-03-24 17:38 cgi-bin
    lrwxrwxrwx 1 root  root      41 2012-03-24 17:45 log -> /var/log/ispconfig/httpd/www.example.com
    drwxr-xr-x 2 web11 client5 4.0K 2012-03-24 17:38 ssl
    drwxr-xr-x 2 web11 client5 4.0K 2012-03-24 17:38 tmp
    drwxr-xr-x 6 web11 client5 4.0K 2012-03-26 00:21 web
    
    The symbolic link goes back to the directory where the yesterday-access.log is linked again. So it seems it goes in a infinite loop. How can this problem be resolved?

    Kind regards,

    Mannekino
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem is a bit different, there is no loop in the symlinks. The reason for your problem is that the website has no pageviews fo more then 30 days, so no new access logs had been created and the old access logs get deleted after one month, so that the target file of the access.log symlink das not exist anymore.
     
  3. Mannekino

    Mannekino New Member

    Ah, that might be an explanation also then. I will make a page view for all the sites listed in the mail messages to see what happens.
     

Share This Page