Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th November 2008, 20:56
astewart astewart is offline
Member
 
Join Date: Feb 2007
Posts: 95
Thanks: 1
Thanked 7 Times in 7 Posts
Question 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?
Reply With Quote
Sponsored Links
  #2  
Old 17th November 2008, 21:23
astewart astewart is offline
Member
 
Join Date: Feb 2007
Posts: 95
Thanks: 1
Thanked 7 Times in 7 Posts
Default .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?
Reply With Quote
  #3  
Old 17th November 2008, 22:14
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

The .htaccess authentication is recreated nightly during the next webalizer run.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 18th November 2008, 16:05
astewart astewart is offline
Member
 
Join Date: Feb 2007
Posts: 95
Thanks: 1
Thanked 7 Times in 7 Posts
Question

Quote:
Originally Posted by till View Post
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
Reply With Quote
  #5  
Old 18th November 2008, 17:07
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 18th November 2008, 17:31
astewart astewart is offline
Member
 
Join Date: Feb 2007
Posts: 95
Thanks: 1
Thanked 7 Times in 7 Posts
Default

Quote:
Originally Posted by till View Post
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.
Reply With Quote
  #7  
Old 18th November 2008, 17:44
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
Default

about which ispconfig version are you talking?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 18th November 2008, 18:07
astewart astewart is offline
Member
 
Join Date: Feb 2007
Posts: 95
Thanks: 1
Thanked 7 Times in 7 Posts
Default

I'm running the latest ISPConfig 3.x SVN Repository version
Reply With Quote
  #9  
Old 18th November 2008, 23:22
astewart astewart is offline
Member
 
Join Date: Feb 2007
Posts: 95
Thanks: 1
Thanked 7 Times in 7 Posts
Question

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
Reply With Quote
  #10  
Old 19th November 2008, 09:59
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,332 Times in 4,184 Posts
 
Default

Ahh ok, that explains my confusion. ISPConfig 3 does not has a password protection for the statistics yet.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Internal 500 Error when accessing ISPCONFIG Panel astewart General 1 16th October 2008 19:21
Postfix + DKIM - Error in log donb01 Server Operation 2 24th July 2008 17:59
500 Internal Server - htaccess failure mspIggy Server Operation 1 9th July 2008 06:35
got 500 internal server error tried to enable chmod from FTP smilem Installation/Configuration 13 17th January 2008 01:34
ispconfig and mambo shajazzi Installation/Configuration 70 28th March 2006 19:29


All times are GMT +2. The time now is 14:26.


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