HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=18)
-   -   Internal 500 Error when Accessing Stats (http://www.howtoforge.com/forums/showthread.php?t=28768)

astewart 17th November 2008 20:56

Internal 500 Error when Accessing Stats
 
I am getting an Internal Server 500 Error when trying to access the webalizer stats for all my domains.

I am prompted for a password when I go to: http://www.domain.com/stats, after that it takes me to the error.

I follows the instructions when installing ISPCONFIG which included the installation of webalizer.

Everything else is working fine, except this :(

Anyone have any ideas?
Should the stats folder belong to www-data or the specific user name and group?

astewart 17th November 2008 21:23

.htaccess file
 
I found out that I had an old .htaccess file from when I migrated the web directory over. I simply removed it and now I have access to the stats.

One question though: Now anyone can access the stats without authentication. Is there suppose to be an .htaccess file or not?

till 17th November 2008 22:14

The .htaccess authentication is recreated nightly during the next webalizer run.

astewart 18th November 2008 16:05

Quote:

Originally Posted by till (Post 155502)
The .htaccess authentication is recreated nightly during the next webalizer run.

Thanks Til, thats what I was thinking too but it appears that the webalizer job (/etc/cron.daily/) does not create the .htaccess file. It does update the Stats but thats about it.

Does anyone have a sample of .htaccess file that is used to authenticate users to there own Stats?

Thanks

till 18th November 2008 17:07

Please do not mix up the webalizer cronjob in of the linux system with the one used by ispconfig. The ispconfig webalizer cronjob creates it, not the one in /etc/cron.daily/. All ispconfif cronjobs are in the root crontab.

astewart 18th November 2008 17:31

Quote:

Originally Posted by till (Post 155651)
Please do not mix up the webalizer cronjob in of the linux system with the one used by ispconfig. The ispconfig webalizer cronjob creates it, not the one in /etc/cron.daily/. All ispconfif cronjobs are in the root crontab.


I just noticed that ispconfig has a cron_daily.sh located in '/usr/local/ispconfig/server/'. This kicks off the cron_daily.php which is also in the same location.

I have verified the Webalizer section and there is no mention of the creation of the .htaccess file:

Code:

#######################################################################################################
// Create webalizer statistics
#######################################################################################################


$sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE server_id = ".$conf["server_id"];
$records = $app->db->queryAllRecords($sql);
foreach($records as $rec) {
        $yesterday = date("mdY",time() - 86400);
        $logfile = escapeshellcmd($rec["document_root"].'/log/'.$yesterday.'-access.log');
        if(@is_file($logfile)) {
                $domain = escapeshellcmd($rec["domain"]);
                $statsdir = escapeshellcmd($rec["document_root"].'/web/stats');
                $webalizer = '/usr/bin/webalizer';
                $webalizer_conf = '/etc/webalizer/webalizer.conf';
                if(!@is_dir($statsdir)) mkdir($statsdir);
                exec("$webalizer -c $webalizer_conf -n $domain -s $domain -r $domain -q -T -o $statsdir $logfile");
        }
}

The /etc/webalizer/webalizer.conf file didn't see to have any helpful information either.

till 18th November 2008 17:44

about which ispconfig version are you talking?

astewart 18th November 2008 18:07

I'm running the latest ISPConfig 3.x SVN Repository version

astewart 18th November 2008 23:22

Here is an example of the .htaccess for Webalizer from an ispconfig 2 installation:

Code:

AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/web12/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>

With ispconfig 3, there seems to be no .htpasswd, so I'm wondering how I can link this to the specified users for that domain?

Thanks

till 19th November 2008 09:59

Ahh ok, that explains my confusion. ISPConfig 3 does not has a password protection for the statistics yet.


All times are GMT +2. The time now is 17:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.