Web Hosting Talk







View Full Version : How to set cpanel and webalizer.conf for individual sites!


eva2000
10-16-2001, 10:56 AM
Works perfectly if you are annoyed with cpanel's webalizer and lack of configurable settings and/or /domlogs directory always filling up :)

Instructions:
http://i4net.tv/marticle/get.php?action=getarticle&articleid=22

Mivo
10-16-2001, 02:41 PM
Thanks for this eva2000. I've been looking for something like this since I switched to WHM/Cpanel server.

teck
10-16-2001, 10:46 PM
I don't get it... each site already has its own webalizer stats in cpanel.. What's the difference if I do it here then?

Mivo
10-16-2001, 11:02 PM
Originally posted by teck
I don't get it... each site already has its own webalizer stats in cpanel.. What's the difference if I do it here then?
The default CPanel setup does not allow you to edit your webalizer config file (it doesn't have one). Also the domlog files' logrotate rate are fixed monthly and are automatically deleted at the end of each month.

So this tip is if you want to change any of the defaults.

eva2000
10-16-2001, 11:06 PM
Originally posted by teck
I don't get it... each site already has its own webalizer stats in cpanel.. What's the difference if I do it here then? the difference is using the webalizer.conf file you can set up webalizer to count .php and other files as pageviews unlike the default cpanel install as well as move the logs out of domlogs so you don't have to clean it out all the time.

plus you can set a specific logrotate for the site different from the default :)

teck
10-16-2001, 11:07 PM
So it reports better? Oh yeah, don't you have to make the log dir in the users homedir before restarting apache? I didn't see it in your instructions.

eva2000
10-16-2001, 11:08 PM
Originally posted by teck
So it reports better? yup especially if your site is all .php files and is high traffic since /home partition would have more space for the logs :)

teck
10-16-2001, 11:14 PM
Hmm, moving the logs first will fill my friends quota :(

eva2000
10-16-2001, 11:19 PM
Originally posted by teck
Hmm, moving the logs first will fill my friends quota :( well then just move it outside of your friend's directory into something like

/home/logs/sitename/domain.com

teck
10-16-2001, 11:24 PM
its okay, just gave him a few hundred more megs for a while. So how does this work? Will this log file take up all his space or will it get decompressed or something?

I'm new to this :(

eva2000
10-16-2001, 11:54 PM
depends on how you setup logrotate for that domain and if you decide to put the log in /home/username/logs/ or in /home/logs/domain.com (2nd one would not take up any of his quota)

for me i edited /etc/logrotate.d/apache and placed in it at the very bottom

/home/username/logs/domain.com {
rotate 24
daily
compress
}


so i have very small compressed log files for that domain.com around 1.7 - 4mb in size and alot of them (24 rotations that's 24 days i think? ) since i save them for quite a while :)

teck
10-17-2001, 12:16 AM
I don't get the logrotate thing.. Right now, my friends log is around 275 megs. I already added the cron and everything. Now, as far as the log rotate entry above, what exactly will it do? What does the rotate 24 mean?

Heh, sorry for the dumb questions :)