Awstats - default config for all new accounts?

ryno267

Well-Known Member
Mar 3, 2004
212
0
166
Chandler, AZ
cPanel Access Level
Root Administrator
search turned up nothing good...

What i'm looking to do is edit a main config file for awstats to SkipHosts so those hosts and possibly a logo and new css sheet for awstats that we'll put in will be used for every new account instead of the basic config they come with now.

Now I can't find anywhere on the server where AWstats is installed...

I've tried -
/var/opt/awstats
/etc/awstats

and some others that I can't think of - so i'm not sure where to look if there was a default config to edit....


thanks
 

ryno267

Well-Known Member
Mar 3, 2004
212
0
166
Chandler, AZ
cPanel Access Level
Root Administrator
All that turned up was /lang directories and old 6.1 backup language files.

like:

/usr/local/cpanel/3rdparty/share/awstats/lang
/usr/local/cpanel/3rdparty/bin/awstats.pl.pre6.1.bak
/usr/local/cpanel/3rdparty/bin/awstats.pl.orig
/usr/local/cpanel/3rdparty/bin/awstats.pl-cpanelsync
/usr/local/cpanel/3rdparty/bin/lang_6.1/tooltips_w/


a bunch of files in each of those directories... but nothing solid like the new 6.4 install files or config stuff...
 

ryno267

Well-Known Member
Mar 3, 2004
212
0
166
Chandler, AZ
cPanel Access Level
Root Administrator
okay.. I increased putty buffer to 5k....

Found these new ones....


/usr/local/cpanel/etc/awstats.conf

/usr/local/cpanel/etc/awstats.conf-cpanelsync



I'm assuming if i changed the .conf one i'll be good????
wahts the difference in the -cpanelsync one??



and my images would go here:
/usr/local/cpanel/base/images/awstats/


EDIT:

I can't modify awstats.conf via root... tried "chattr +i awstats.conf" and no workie either...
 
Last edited:

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
It would be chattr -i ;) To check if the file has such attributes use:

lsattr filename

More than that, I cannot help as I've not played with modifying awstats.
 

ryno267

Well-Known Member
Mar 3, 2004
212
0
166
Chandler, AZ
cPanel Access Level
Root Administrator
ok.. the -i worked..

created a new account and the /tmp/awstats/awstats.testing.com.conf had the SkipHost stuff in there by default...

very awesome... Thank you chirps!
 

MMarko

Well-Known Member
Apr 18, 2005
316
0
166
Does anybody know how to disable stats for subdomain? I've done the search but nothing helpful wasn't found.
 

MMarko

Well-Known Member
Apr 18, 2005
316
0
166
I've found the solution. Here you are...

WHM: Is it possible to disable and enable statistics for certain accounts?
You can't do this in WHM, however the server admins can do this via the shell.

It's not a very known fact, but you can enable and disable each statistics application
per user. For example, if you have Weblizer and Analog enabled for all users, yet one user
wants Awstats only, this can be done!

Let's say the user's username is johndoe, first you will need to SSH into the server as root,
now use your favorite editor, and edit the file:

/var/cpane/users/johndoe



Now, if you wanted to disable all statistics applications and enable awstats, you would add these lines:

skipanalog=1
skipawstats=0
skipwebalizer=1



Next, you'll need to restart cPanel, you can normally do this by doing :

/etc/init.d/cpanel restart



Now, when the user johndoe logs into cPanel, he'll see Awstats, but not Analog and Webalizer!
source
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Well, yes, or you could just use the stats selector which is a WHM addon in STABLE/RELEASE or built in in anything newer. However, neither will disable just one particular subdomain that's part of a main domain accounts, AFAIK.