Jump to content
Froxlor Forum
  • 0

get rid of webalizer


roothahn

Question

Hello,

 

I apologize that I didn't found any solution even after very hard searching - maybe it has been answered before, but seriously I couldn't find an answer.

 

The question is very simple: I don't want to use webalizer and awstats. I was crawling through the scripts but nowhere I could find the appropriate line.

 

Not Everytime the cronjob runs, but I suppose everytime something adds/changes, the webalizer folder will be created unter every user's domain folder.

 

I just found * TYPE=2 MEANS TO CREATE A NEW HOME AND CHOWN

and changed the 2 mkdir lines following:

 

    if(is_array($row['data']))
               {
                       $cronlog->logAction(CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));
                       safe_exec('mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));

                       //check if admin of customer has added template for new customer directories
                       $destdir = makeCorrectDir($settings['system']['documentroot_prefix'] . '/' . $row['data']['loginname']);
                       storeDefaultIndex($row['data']['loginname'], $destdir, $cronlog, true);

but that wasn't everything ...

 

the awstats folder is not been created anymore, but still webalizer ...

 

 

please help :-)

Link to post
Share on other sites

9 answers to this question

Recommended Posts

You can try to disable the traffic-cronjob

 

But then I would no more have disk usage, huh?

Anyway for testing, I deleted the files /scripts/jobs/cron_traffic* and the symlink /scripts/cron_traffic.php

-> didn't help.

 

I found the table panel_settings and the field "webalizer_enabled", was set to 1.

I set it to 0. Did not help. (what else is this field for?)

 

Shouldn't it be a command containing "mkdir" anywhere in the scripts?

 

# grep mkdir * -r | grep -v CRON
lib/classes/aps/class.ApsInstaller.php:			if(!file_exists($this->RealPath . $this->DomainPath . '/'))mkdir($this->RealPath . $this->DomainPath . '/', 0777, true);
lib/classes/aps/class.ApsInstaller.php:						if(!file_exists($Destination . $NewPath))mkdir($Destination . $NewPath, 0777, true);
lib/classes/aps/class.ApsInstaller.php:								mkdir ($dir, 0777, true);
lib/classes/aps/class.ApsInstaller.php:				if(!file_exists($Destination))mkdir($Destination, 0777, true);
lib/classes/aps/class.ApsParser.php:				if(!file_exists($Destination))mkdir($Destination, 0777, true);
lib/functions/froxlor/function.createAWStatsConf.php:		safe_exec('mkdir -p '.escapeshellarg($awstats_dir));
lib/functions/froxlor/function.createAWStatsConf.php:		safe_exec('mkdir -p '.escapeshellarg($settings['system']['awstats_conf']));
lib/functions/filedir/function.safe_exec.php:		'mkdir',
lib/functions/filedir/function.mkDirWithCorrectOwnership.php:				safe_exec('mkdir -p ' . escapeshellarg($sdir));
lib/configfiles_index.inc.php:	$configcommand['vhost'] = 'mkdir -p ' . $settings['system']['apacheconf_vhost'];
lib/configfiles_index.inc.php:	$configcommand['diroptions'] = 'mkdir -p ' . $settings['system']['apacheconf_diroptions'];
scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php:				safe_exec('mkdir -p ' . escapeshellarg($configdir));
scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php:				safe_exec('mkdir -p ' . escapeshellarg($tmpdir));
scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php:				safe_exec('mkdir -p ' . escapeshellarg($configdir));
scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php:				safe_exec('mkdir -p ' . escapeshellarg($tmpdir));
scripts/jobs/cron_tasks.inc.http.10.apache.php:							safe_exec('mkdir -p '.escapeshellarg($suexecpath));
scripts/jobs/cron_tasks.inc.http.10.apache.php:					fwrite($this->debugHandler, '  apache::writeConfigs: mkdir ' . escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_diroptions'])) . "\n");
scripts/jobs/cron_tasks.inc.http.10.apache.php:					safe_exec('mkdir ' . escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_diroptions'])));
scripts/jobs/cron_tasks.inc.http.10.apache.php:				mkdir($this->settings['system']['apacheconf_htpasswddir'], 0751);
scripts/jobs/cron_tasks.inc.http.10.apache.php:					fwrite($this->debugHandler, '  apache::writeConfigs: mkdir ' . escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_vhost'])) . "\n");
scripts/jobs/cron_tasks.inc.http.10.apache.php:					safe_exec('mkdir ' . escapeshellarg(makeCorrectDir($this->settings['system']['apacheconf_vhost'])));
scripts/jobs/cron_tasks.php:			safe_exec('mkdir -p ' . escapeshellarg($settings['system']['documentroot_prefix'] . $row['data']['loginname']));

 

Still webalizer folder will be created in every user's home (not in the documentroots, just /var/customers/webs/*user*/webalizer)

:-(

Link to post
Share on other sites

I found lib/functions/filedir/function.mkDirWithCorrectOwnership.php

 

On Line 88 there is

safe_exec('mkdir -p ' . escapeshellarg($sdir));

 

So $subdirs is an Array in which is "webalizer" stored, and came from $dirToCreate.

But I can't figure out how "webalizer" got into that array.

 

Anyway, there is no "storeDefaultIndex()" ?

Link to post
Share on other sites

Anyway, there is no "storeDefaultIndex()" ?

 

You sure? Why don't you try a

grep -r "storeDefaultIndex" /var/www/froxlor/"

first?

 

But i found the issue, when creating a new customer, 2 default htpasswd-entries are created, causing the cronjob to auto-create the directories if they don't exist.

And because if Awstats is enabled, webalizer is always the default option (there is no complete turn-off, because else we can't get traffic-stats)

Link to post
Share on other sites

You sure? Why don't you try a

grep -r "storeDefaultIndex" /var/www/froxlor/"

first?

 

But i found the issue, when creating a new customer, 2 default htpasswd-entries are created, causing the cronjob to auto-create the directories if they don't exist.

And because if Awstats is enabled, webalizer is always the default option (there is no complete turn-off, because else we can't get traffic-stats)

 

Sorry i grepped for "storeDefaultIndex()" ;-)

 

But Awstats is disabled, by panel and somewhere in the scripts I changed something which disables some awstats mkdirs, I think ...

 

mhm. I want to disable all traffic too. Don't need that - no chance?

Link to post
Share on other sites

But Awstats is disabled, by panel and somewhere in the scripts I changed something which disables some awstats mkdirs, I think ...

 

That's not what i was talking about, i said, if Awstats is disabled, webalizer will be the only alternativ. Disabling both is not possible without patching

Link to post
Share on other sites

That's not what i was talking about, i said, if Awstats is disabled, webalizer will be the only alternativ. Disabling both is not possible without patching

 

Ok :mellow: I thank you for your help :)

 

I'll setup a cronjob to delete the webalizer folders. For that's just a beauty-issue and not a big thing.

Who also needs to:

 

find /var/customers/webs/ -type d -name webalizer -print0 | xargs -0 rm -rf

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...