Re: [webalizer] Re: Using custom Webalizer with Cpanel 6.0
- Yes, I know Webalizer uses a central configuration for cPanel. What I need
to do is be able to install Webalizer on a "per domain" basis, but I don't
know how to install it. Can you help? Thanks for your time!
See my other e-mail I just wrote on this� - cpanel seems to use some
centrally installed webalizer whose configuration cannot be altered
I installed my own copy of webalizer in my own directory and set it
up for my own purposes. It works fine. Maybe this solution will work
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
Please note that I am neither a programmer nor a webalizer-expert. I only
want to generate for my clients relevant reports for their marketing.
So the following might be a complete nuisance to someone who has
in-depth knowledge of programming or of The Webalizer. However, it works
for me. Hope it helps.
Here's how we run the webalizer for all of our clients:
You don't need various copies of the webalizer, you just need to run the
installed webalizer using the parameter to use a specific config. Then
you create a config for each client's domain and run the webalizer using
these configs. For your convenience you can put all the configs (for all
of your clients) in one folder and then run the webalizer simply using
all configs in that folder. As an example, I attach a config file for
one of our clients.
on my host, the webalizer is installed in /usr/local/cpanel/3rdparty/bin/
So you could just run the webalizer with the following command:
/usr/local/cpanel/3rdparty/bin/webalizer -c /path/to/configfileforclientx.config
Check out the readme for more command line options; however, I use just
this one and define everything else in the config file.
I created under my own domain (hosted on the same server) a folder where
I put all the configs for my clients. So actually I'd run the webalizer
/usr/local/cpanel/3rdparty/bin/webalizer -c /home/mydomain/public_html/webalizerconfigfiles/configfileforclientx.config
However, as mentioned, check out the command to run the webalizer using
all the configs in a specific folder (check out the readme). In my case
it looks like this:
for i in /home/mydomain/public_html/webalizerconfigfiles/*.conf; do /usr/local/cpanel/3rdparty/bin/webalizer -c $i; done
In the config files I specify where to save the reports and basically
In my case I specify them to be saved in
/home/mydomain/public_html/myclient/ and password-protect that folder,
give the user and password to the client and you're ready to roll.
However, there are two things I wanted to enhance:
- I didn't want to depend on their saving and rotation of the logfiles
but have them in my own folder to do with them whatever I want.
- I wanted to make certain changes to the analysis that can't be made in
the config file (at least to my knowledge) (I am referring to the
ability to not count the requests to "/"; see below).
So, since I'm working with one nifty hosting company (don't want to
advertise here but if you're looking for one, mail me) they are doing
the following for me:
The logfiles are located in
with the logfile being named as the domain itself, so for example the
logfiles for myclientsdomain.com are called
So I wrote a little script that deletes (almost) everything I don't want
>from each log (reducing each log to about 1/3 to 2/3 of its originalsize), gzips them and copies them to a folder under my domain. There I
analyze each logfile using its respective config file. This is being
done twice a day. The "cleaning" is being done using the "grep" command.
Don't get scared if you don't know programming - I don't either but
got it figured out.
The process of cleaning, gzipping and moving the logs has to be done
with root privileges since my client's logs are technically not mine so
I don't have the rights to see them or do anything with them. And this
is where my hosting company comes in: they set it up to run as a cron
job (twice a day, as mentioned) of root.
Here's a sample script how to delete unwanted entries from the logfile
### myclient.com ###
egrep -iv 'GET /image|GET /estilos.css|GET /scripts.js|GET / ' /usr/local/apache/domlogs/myclient.com > /usr/local/apache/domlogs/myclient.comKINTA
mv /usr/local/apache/domlogs/myclient.comKINTA.gz /home/mydomain/clientlogs/
chown mydomain /home/mydomain/clientlogs/myclient.comKINTA.gz
Note that for this specific client I also delete lines that contain the
string "GET /"
This is done because "index.html" is only a redirect to the homepage,
like home1.html or whatever. So I don't want the request to the root
counted, but only the request for "home1.html". Btw that's something I
didn't manage to configure in the .conf-file, so I'm gla
But if you want your index.html to be counted, you have to delete that
part from the above grep-command.
Check out help for the grep command in the web, there's truckloads of
them out there.
Well, I hope this was of help to you. If you have questions don't
hesitate to ask.
On Fri, 09 May 2003 00:24:52 +0000
"Aaron Hiatt" <aaronvhiatt@...> wrote:
> Yes, I know Webalizer uses a central configuration for cPanel. What I need________________________________________________
> to do is be able to install Webalizer on a "per domain" basis, but I don't
> know how to install it. Can you help? Thanks for your time!
> Hi Aaron
> See my other e-mail I just wrote on this� - cpanel seems to use some
> centrally installed webalizer whose configuration cannot be altered
> by clients.
> I installed my own copy of webalizer in my own directory and set it
> up for my own purposes. It works fine. Maybe this solution will work
> for you?
< k i n t a d i m e n s i � n | multimedia
< Av. Gral. Rivera 4725 / 204
< 11400 Montevideo
< Tel./Fax +598 (2) 619 8522
< Jabber, Yahoo!, AIM: kintadimension