ispCP - Board - Support
AWStats does not work in r857 ?! - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: AWStats does not work in r857 ?! (/thread-1541.html)

Pages: 1 2


AWStats does not work in r857 ?! - BeNe - 10-16-2007 12:38 AM

Hello community,

can someone also confirm that there is an Error in r857 on AWStats ?
--> http://ispcpdemo.homeip.net/stats/
Code:
Error 404!

/stats/
File Not Found!
AWStats is enabled:
Code:
#
# AWSTATS data
#

AWSTATS_ACTIVE = yes

# could be 'dynamic' = 0 or 'static' = 1
AWSTATS_MODE = 0

AWSTATS_CACHE_DIR = /var/cache/awstats

AWSTATS_CONFIG_DIR = /etc/awstats

AWSTATS_ENGINE_DIR = /usr/lib/cgi-bin

AWSTATS_WEB_DIR = /usr/share/awstats

AWSTATS_ROOT_DIR = /var/www/ispcp/engine/awstats
But there is no Apache2 entry:
Code:
....
   Redirect /ispcp http://admin.ispcpdemo.homeip.net

    <IfModule mod_cband.c>
        CBandUser ispcpdemo.homeip.net
    </IfModule>

    # httpd awstats support BEGIN.

   # httpd awstats support END.

    # httpd dmn entry cgi support BEGIN.
    ScriptAlias /cgi-bin/ /var/www/virtual/ispcpdemo.homeip.net/cgi-bin/
    <Directory /var/www/virtual/ispcpdemo.homeip.net/cgi-bin>
        AllowOverride None
        #Options ExecCGI
        Order allow,deny
        Allow from all
    </Directory>
    # httpd dmn entry cgi support END.
....

Greez BeNe


RE: AWStats does not work in r857 ?! - BeNe - 10-16-2007 12:47 AM

The Data is generated correct:
Code:
ispcpdemo:/var/cache/awstats# ls -l
insgesamt 8
-rw-r--r-- 1 root root 6348 2007-10-15 16:45 awstats102007.ispcpdemo.homeip.net.txt
ispcpdemo:/var/cache/awstats#

Maybe it looks _only_ like a template problem ?

Greez BeNe


RE: AWStats does not work in r857 ?! - zpin - 10-16-2007 01:08 AM

I think this should fix it:
Code:
Index: engine/ispcp-dmn-mngr
===================================================================
--- engine/ispcp-dmn-mngr       (revision 858)
+++ engine/ispcp-dmn-mngr       (working copy)
@@ -1025,10 +1025,10 @@
        my $awstats_entry = undef;

        if ($main::cfg{'AWSTATS_ACTIVE'} eq 'yes' && $main::cfg{'AWSTATS_MODE'} eq 1) {
-               $awstats_entry = "$dmn_awstats_entry\n$dmn_awstats_b\n$dmn_awstats_e";
+               $awstats_entry = "$dmn_awstats_b\n$dmn_awstats_e";
        }
        else {
-               $awstats_entry = "$dmn_awstats_b\n$dmn_awstats_e";
+               $awstats_entry = "$dmn_awstats_b\n$dmn_awstats_entry\n$dmn_awstats_e";
        }

     ($rs, $dmn_entry) = repl_tag(
@@ -2355,7 +2355,7 @@
                                        '{DMN_NAME}' => $dmn_name
                                   );

-       ($rs, $cfg) = prep_tpl(\%tag_hash, $starter_tpl);
+       ($rs, $cfg) = prep_tpl(\%tag_hash, $ini_tpl);
        return $rs if ($rs != 0);

        ($rs, $rdata) = store_file(
@@ -2381,7 +2381,7 @@
                                        '{DMN_NAME}' => $dmn_name
                                   );

-       ($rs, $cfg) = prep_tpl(\%tag_hash, $starter_tpl);
+       ($rs, $cfg) = prep_tpl(\%tag_hash, $ini_tpl);
        return $rs if ($rs != 0);

        ($rs, $rdata) = store_file(



RE: AWStats does not work in r857 ?! - zpin - 10-16-2007 01:28 AM

Another thing for awstats static: Shouldn't there be some kind of Alias "/stats /var[...]/statistics" in the dmn_entry?


RE: AWStats does not work in r857 ?! - Cube - 10-16-2007 08:58 AM

Quote:Another thing for awstats static: Shouldn't there be some kind of Alias "/stats /var[...]/statistics" in the dmn_entry?
Yes, there is now no possibility to access the stats.

And why are there proxy-settings added to the config? IMO they are not needed, when using awstats static, but they require useless proxy modules.


RE: AWStats does not work in r857 ?! - RatS - 10-16-2007 09:00 AM

static AWStats are Crap! That's all. It only wastes ressources and time - my time - implementing needed things!

Can you please give me on good reason why to use static AWStats?


RE: AWStats does not work in r857 ?! - Cube - 10-16-2007 09:15 AM

Perhaps they are. But if they are implemented, they also should work properly.
Normally dynamic is much better. One thing I don't like is that I have to activate 3 modules I normally wouldn't need. But this i probably only my concern. Shy


RE: AWStats does not work in r857 ?! - raphael - 10-16-2007 12:08 PM

Quote:It only wastes ressources
actually, parsing the files on each request wastes more resources than doing it only once Tongue


RE: AWStats does not work in r857 ?! - RatS - 10-16-2007 05:14 PM

How many request are there on stats a day? Less than one each day per site. If they are less than one, dynamic wins the race, static has one each day.


RE: AWStats does not work in r857 ?! - zpin - 10-16-2007 05:36 PM

I've had a look at the cpu usage during awstats dynamic browsing and it's rather high. I think I'll switch back to static so it doesn't affect the gameservers too much (because with static I can chose at which time it generates the cpu load, plus I can nice it down a bit).
I think all that is needed for it to work is the following in a vhost domain entry:
Code:
Alias /stats    /{WWW_DIR}/{DMN_NAME}/statistics/

    <Directory "/{WWW_DIR}/{DMN_NAME}/statistics">
        AllowOverride None
        DirectoryIndex awstats.{DMN_NAME}.html
        Order allow,deny
        Allow from all
    </Directory>

in the dmn mngr we could then just substitute the current awstats template with this one when awstats mode is 1.