now webalizer stats

Discussion in 'Installation/Configuration' started by olasamuelson, Aug 12, 2008.

  1. olasamuelson

    olasamuelson New Member

    Hi!
    First, a thank you to all of you involved with ispconfig, very neat.

    I have a standard setup LAMP(Fedora 8) + ispconfig.
    Did nothing special other than add directives for Tomcat to the various
    domains. But i used the UI for that.

    I get no stats.

    - httpd logs to /etc/httpd/logs/access_log
    AND this looks strange: /var/log/httpd/access_log
    Same timestamp/size entries....

    first i thought it was the same file symlinked but it is not and i can not find
    where httpd is told to log to two locations. the only statement in effect i can find is in /etc/httpd/conf/httpd.conf and it is:
    CustomLog logs/access_log combined

    There are a few "web.log" for _some_ of the domains and they are all
    from May. So maybe it worked at some point but it does not now.

    Domains added recently does not have web.log. Only "old" domains have.

    So my questions are, any hints appreciated:
    1. why logging to two locations? if not ok - how do i turn it off?
    2. ispconfig should split/move so that each domain has its own
    access log before webalizer is run. this does not work. hints?

    I saw hints about killing cron editing with crontab -e etc and i have tried those to no avail. Well, maybe you have another idea.

    Cron log says webalizer was run 4am today:
    Aug 11 04:00:01 ns CROND[9426]: (root) CMD (/root/ispconfig/php/php /root/ispconfig/scripts/shell/webalizer.php &> /dev/null)

    Sorry, not a pro on hosting. Ideas anyone?

    TIA
    Ola
     
  2. olasamuelson

    olasamuelson New Member

    no webalizer stats

    seems /root/ispconfig/scripts/shell/logs.php reads entries from
    from /var/log/httpd/ispconfig_access_log_2008_08_12
    but that file is empty.

    all logentries are in /var/log/httpd/access_log

    i realize that maybe some process should move/split data so that
    it ends up in /var/log/httpd/ispconfig_access_log_2008_08_12 but in that case that process is not running for some reason.

    can you see anything wrong here?
     
  3. falko

    falko Super Moderator ISPConfig Developer

    Can you post the output of
    Code:
    ls -la /var/log/httpd
    ?

    What's the output of
    Code:
    cd /etc/httpd
    grep -r "CustomLog" *
    ?
     
  4. olasamuelson

    olasamuelson New Member

    ls -la /var/log/httpd
    totalt 135004
    drwx------ 2 root root 4096 12 aug 13.25 .
    drwxr-xr-x 12 root root 4096 14 aug 04.13 ..
    -rw-r--r-- 1 root root 24120129 14 aug 08.21 access_log
    -rw-r--r-- 1 root root 29381190 20 jul 04.12 access_log-20080720
    -rw-r--r-- 1 root root 25280500 27 jul 04.10 access_log-20080727
    -rw-r--r-- 1 root root 25180316 3 aug 04.13 access_log-20080803
    -rw-r--r-- 1 root root 33609658 10 aug 04.15 access_log-20080810
    -rw-r--r-- 1 root root 6741 13 aug 22.35 error_log
    -rw-r--r-- 1 root root 21467 20 jul 04.16 error_log-20080720
    -rw-r--r-- 1 root root 23092 27 jul 04.16 error_log-20080727
    -rw-r--r-- 1 root root 2420 3 aug 04.16 error_log-20080803
    -rw-r--r-- 1 root root 11833 10 aug 04.17 error_log-20080810
    -rw-r--r-- 1 root root 0 28 maj 09.12 ispconfig_access_log
    -rw-r--r-- 1 root root 1501 19 feb 10.40 ispconfig_access_log_2008_02_19
    -rw-r--r-- 1 root root 883 25 feb 13.45 ispconfig_access_log_2008_02_25
    -rw-r--r-- 1 root root 229 28 feb 09.49 ispconfig_access_log_2008_02_28
    -rw-r--r-- 1 root root 235 5 mar 10.55 ispconfig_access_log_2008_03_05
    lrwxrwxrwx 1 root root 46 5 mar 10.55 ispconfig_access_log-20080309 -> /var/log/httpd/ispconfig_access_log_2008_03_05
    lrwxrwxrwx 1 root root 46 3 apr 18.22 ispconfig_access_log-20080404 -> /var/log/httpd/ispconfig_access_log_2008_04_03
    lrwxrwxrwx 1 root root 46 6 apr 00.40 ispconfig_access_log-20080406 -> /var/log/httpd/ispconfig_access_log_2008_04_06
    lrwxrwxrwx 1 root root 46 12 apr 01.42 ispconfig_access_log-20080413 -> /var/log/httpd/ispconfig_access_log_2008_04_12
    -rw-r--r-- 1 root root 320 15 apr 00.37 ispconfig_access_log_2008_04_15
    -rw-r--r-- 1 root root 313 19 apr 09.40 ispconfig_access_log_2008_04_19
    lrwxrwxrwx 1 root root 46 19 apr 09.39 ispconfig_access_log-20080420 -> /var/log/httpd/ispconfig_access_log_2008_04_19
    -rw-r--r-- 1 root root 183 23 apr 15.11 ispconfig_access_log_2008_04_23
    lrwxrwxrwx 1 root root 46 26 apr 21.44 ispconfig_access_log-20080427 -> /var/log/httpd/ispconfig_access_log_2008_04_26
    -rw-r--r-- 1 root root 141 28 apr 16.51 ispconfig_access_log_2008_04_28
    lrwxrwxrwx 1 root root 46 3 maj 11.09 ispconfig_access_log-20080504 -> /var/log/httpd/ispconfig_access_log_2008_05_03
    -rw-r--r-- 1 root root 2386 9 maj 22.06 ispconfig_access_log_2008_05_09
    lrwxrwxrwx 1 root root 46 9 maj 16.05 ispconfig_access_log-20080511 -> /var/log/httpd/ispconfig_access_log_2008_05_09
    -rw-r--r-- 1 root root 291 12 maj 20.25 ispconfig_access_log_2008_05_12
    lrwxrwxrwx 1 root root 46 17 maj 00.52 ispconfig_access_log-20080518 -> /var/log/httpd/ispconfig_access_log_2008_05_17
    -rw-r--r-- 1 root root 218144 22 maj 11.39 ispconfig_access_log_2008_05_20
    lrwxrwxrwx 1 root root 46 20 maj 18.38 ispconfig_access_log-20080525 -> /var/log/httpd/ispconfig_access_log_2008_05_20
    -rw-r--r-- 1 root root 28800 14 aug 08.21 jk-runtime-status.18124
    -rw-r--r-- 1 root root 1 12 aug 09.16 jk-runtime-status.18124.lock
    -rw-r--r-- 1 root root 28800 20 maj 18.37 jk-runtime-status.5904
    -rw-r--r-- 1 root root 1 20 maj 18.37 jk-runtime-status.5904.lock
    -rw-r--r-- 1 root root 0 25 maj 04.09 mod_jk.log
    -rw-r--r-- 1 root root 1523 2 maj 17.44 mod_jk.log-20080504
    -rw-r--r-- 1 root root 1384 4 maj 04.11 mod_jk.log-20080511
    -rw-r--r-- 1 root root 1669 15 maj 23.22 mod_jk.log-20080518
    -rw-r--r-- 1 root root 63846 20 maj 18.37 mod_jk.log-20080525


    grep output as attachment.

    thank you.
     

    Attached Files:

  5. olasamuelson

    olasamuelson New Member

    took a look at the grep -r "CustomLog" * output and it seems an update destroyed the directive previously in the configs put there by ispconfig.
    Does that sound plausible?

    I added:
    CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig

    restarted httpd. Look ok.
    Then ran whats in crontab i.e logs.php.

    First it complained about not being able to apply chown using group web0.
    I can understand that because there is no such group or virtual host.

    Anyway, created the group just to see what will happen.
    Logically enough it now complains about
    $link = readlink("$webroot/$virtual_host");

    Looks like there are "ghost" hosts in the db without actual document root.
    Wouldnt' you agree? Or is it that there are other entries in /var/www that interferes?

    Was this the right approach or should i go back?

    Thanks
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Yes, that's possible.

    Can you post the output of
    Code:
    ls -la /var/www
    ?
     
  7. olasamuelson

    olasamuelson New Member

    Solved....yum ran replaced httpd.conf

    Thanks Falko!
    You gave me right clues.

    Here's what happened(i think).

    Yum, for some reason i do not know updated httpd and replaced
    the proper httpd.conf. I am not the only one on this box so....
    someone updated httpd.

    This lead to httpd writing a lot of strangely named directories in the /var/www/


    So just restoring the httpd.conf from httpd.conf.rpmsave did not help.
    Removing all junk directories helped.

    And so ..now it appears to work.

    Thanks for your help.
    Regards
    Ola
     

Share This Page