ISPConfig 2.2.29 webalizer awstats problem

Discussion in 'General' started by dvazart, Jan 30, 2009.

  1. dvazart

    dvazart New Member

    From : http://www.howtoforge.com/forums/showthread.php?t=7293
    ------------------------------------------------------------------------------------------------------

    I'm using ISPConfig 2.2.29 but i don't have a web.log file in my web directory, i only have an error.log file...

    ls /var/www/web1/log/
    Code:
    error.log
    And i think is normal when i look this :

    nano /etc/apache2/vhosts/Vhosts_ispconfig.conf
    Code:
    <VirtualHost 192.168.1.200:80>
    ServerName www.daniel.org:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web2/web
    ServerAlias daniel.org
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ErrorLog /var/www/web2/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    Alias /error/ "/var/www/web2/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web2/user/$1/web/$3
    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
      RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    
    So... thats may be a bug in ISPConfig 2.2.29 are you forget to include this file in the vhost config ?? OR you have to modify your AWstats script....

    I found this... In ISPConfig 2.2.27 (awstats and webalizer are working ok) :

    ls -l log/
    Code:
    total 4
    drwxr-xr-x 3 web2_daniel web2 4096 2008-11-19 00:30 2008
    -rw-r--r-- 1 web2_daniel web2    0 2008-11-18 09:35 error.log
    lrwxrwxrwx 1 web2_daniel web2   45 2008-11-19 00:30 web.log -> /var/www/www.daniel.local/log/2008/11/web.log
    
    But in ISPConfig 2.2.29 Nothing (no awstats, no webalizer, no web.log).

    ISPConfig 2.2.27 :

    grep -r "web.log" /root/
    Code:
    /root/ispconfig/scripts/shell/logs.php:        return "$webroot/$virtual_host/log/$jahr/$monat/web.log";
    /root/ispconfig/scripts/shell/logs.php:                if(@readlink("$webroot/$virtual_host/log/web.log") != get_filename($virtual_host)) {
    /root/ispconfig/scripts/shell/logs.php:                        if(is_link("$webroot/$virtual_host/log/web.log")) @unlink("$webroot/$virtual_host/log/web.log");
    /root/ispconfig/scripts/shell/logs.php:                        @symlink(get_filename($virtual_host),"$webroot/$virtual_host/log/web.log");
    
    ISPConfig 2.2.29 :

    grep -r "web.log" /root/
    Code:
    /root/ispconfig/scripts/shell/logs.php:        return "$webroot/$virtual_host/log/$jahr/$monat/web.log";
    /root/ispconfig/scripts/shell/logs.php:                if(@readlink("$webroot/$virtual_host/log/web.log") != get_filename($virtual_host)) {
    /root/ispconfig/scripts/shell/logs.php:                        if(is_link("$webroot/$virtual_host/log/web.log")) @unlink("$webroot/$virtual_host/log/web.log");
    /root/ispconfig/scripts/shell/logs.php:                        @symlink(get_filename($virtual_host),"$webroot/$virtual_host/log/web.log");
    
    All seems to be OK.... no ?
     
  2. dvazart

    dvazart New Member

    :D Sorry.... not seen this:
    crontab -l
    Code:
    30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
    Everythig are working ok !!! :p
     
  3. dvazart

    dvazart New Member

    :D Sorry.... not seen this:
    crontab -l
    Code:
    30 00 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/logs.php &> /dev/null
    Everythig are working ok !!! :p
     
  4. DantePasquale

    DantePasquale Member HowtoForge Supporter

    For some reason the awstats cron script was missing in my configuration, too. Luckily I have the original src still around and followed the install.sh script to see what was missing.

    The first two lines of the script were all I had to do:

    Code:
    cd /usr/src/ISPConfig_awstats_pkg/
    sudo cp awstats.php /root/ispconfig/scripts/shell/awstats.php
    sudo chmod 644 /root/ispconfig/scripts/shell/awstats.php
    Here's the entire install.sh for those that may no longer have that around:

    Code:
    #!/bin/sh
    mkdir /etc/awstats
    cp awstats.shared.conf /etc/awstats/awstats.shared.conf
    chmod 644 /etc/awstats/awstats.shared.conf
    cp awstats.php /root/ispconfig/scripts/shell/awstats.php
    chmod 644 /root/ispconfig/scripts/shell/awstats.php
    
    # Backup the Apache configuration
    cp -p /etc/apache2/apache2.conf /etc/apache2/apache2.conf.ispcfg_awstats_bkup
    
    # Decompress Awstats in the /tools directory
    tar xvfz awstats-6.7.tar.gz -C /home/admispconfig/ispconfig/tools
    chmod 755 /home/admispconfig/ispconfig/tools/awstats-6.7/
    ln -s /home/admispconfig/ispconfig/tools/awstats-6.7 /home/admispconfig/ispconfig/tools/awstats
    
    # Adding Apache Alias (Very experimental)
    if [[ -e /etc/apache2/apache2.conf ]]
    then
      sed -i -f apache.sed /etc/apache2/apache2.conf
      /etc/init.d/apache2 restart
    elif [[ -e /etc/httpd/conf/httpd.conf ]]
    then
      sed -i -f apache.sed /etc/httpd/conf/httpd.conf
      /etc/init.d/httpd restart
    elif [[ -e /etc/apache2/default-server.conf ]]
    then
      sed -i -f apache.sed /etc/apache2/default-server.conf
      /etc/init.d/apache2 restart
    fi
    
    # Adding a Cron Job
    crontab -l > /tmp/crontab.lst
    sed -i -f crontab.sed /tmp/crontab.lst
    crontab /tmp/crontab.lst
     

Share This Page