#1  
Old 11th September 2005, 13:13
Lobanak Lobanak is offline
Junior Member
 
Join Date: Sep 2005
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default web.log and webalizer

Hi all!

First I must say ISPconfig is very good. I like it very much.

But now I have one problem with webalizer and the stats.

/root/ispconfig/scripts/shell/webalizer.php (started by cron) is searching for the file web.log in the log directory of the webs. But this file is not generated. There is only the file error.log. In /etc/apache2/vhosts/Vhosts_ispconfig.conf there is no entry for the CustomLog in the virtualhosts.

I searched a bit and have noticed, that the entries are missing in /root/ispconfig/isp/conf/vhost.conf.master and /root/ispconfig/scripts/lib/config.lib.php.

I think this should be corrected in the next release, so that webalizer is working. I use V.2.0.8.

I don't know if the following is right, but I think this could be the solution (not tested). If this is right, please tell here.

in /root/ispconfig/scripts/lib/config.lib.php the WEB_CUSTOM_LOG
Code:
$mod->tpl->assign( array( SERVERNAME => $servername.$web_port,
                        IP => $web["web_ip"].$web_port,
                        DOCUMENTROOT => $document_root,
                        SERVERALIAS => $serveralias,
                        DIRECTORYINDEX => $directory_index,
                        CGI => $cgi,
			WEB_CUSTOM_LOG => $mod->system->server_conf["server_path_httpd_root"]."/web".$web["doc_id"]."/log/web.log combined",
                        WEB_ERROR_LOG => $mod->system->server_conf["server_path_httpd_root"]."/web".$web["doc_id"]."/log/error.log",
                        SERVERADMIN => "webmaster@".$web["web_domain"],
                        PHP => $php,
                        SSI => $ssi,
                        WAP => $wap,
                        ERRORALIAS => $error_alias,
                        ERROR => $error,
                        WEB => "web".$web["doc_id"],
                        HTTPD_INCLUDE => $web_httpd_include,
                        SUEXEC => $suexec,
                        REWRITE_RULE => $rewrite_rule,
                        FRONTPAGE => $frontpage,
                        SSL => $ssl,
                        HTTPD_ROOT => $mod->system->server_conf["server_path_httpd_root"]));
    $mod->tpl->parse(VHOST,".vhost");
  }
  } else {
  $mod->tpl->assign( array( SERVERNAME => "",
                        IP => "",
                        DOCUMENTROOT => "",
                        SERVERALIAS => "",
                        DIRECTORYINDEX => "",
                        CGI => "",
			WEB_CUSTOM_LOG => "",
                        WEB_ERROR_LOG => "",
                        SERVERADMIN => "",
                        PHP => "",
                        SSI => "",
                        WAP => "",
                        ERRORALIAS => "",
                        ERROR => "",
                        WEB => "",
                        HTTPD_INCLUDE => "",
                        SUEXEC => "",
                        REWRITE_RULE => "",
                        FRONTPAGE => "",
                        SSL => "",
                        HTTPD_ROOT => ""));
    $mod->tpl->parse(VHOST,".vhost");
in /root/ispconfig/isp/conf/vhost.conf.master the CustomLog
Code:
<VirtualHost {IP}>
{HTTPD_INCLUDE}
{SUEXEC}
ServerName {SERVERNAME}
ServerAdmin {SERVERADMIN}
DocumentRoot {DOCUMENTROOT}
{SERVERALIAS}
{DIRECTORYINDEX}
{CGI}
CustomLog {WEB_CUSTOM_LOG}
ErrorLog {WEB_ERROR_LOG}
{PHP}
{SSI}
{WAP}
{ERRORALIAS}
{ERROR}
AliasMatch ^/~([^/]+)(/(.*))? {HTTPD_ROOT}/{WEB}/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? {HTTPD_ROOT}/{WEB}/user/$1/web/$3
{REWRITE_RULE}
{FRONTPAGE}
</VirtualHost>
Greets

Lobanak

Last edited by Lobanak; 11th September 2005 at 13:19.
Reply With Quote
Sponsored Links
  #2  
Old 11th September 2005, 13:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

Hi,

it is correct that there are no custom log entries in the vhosts. This would slowdown ISPConfig and will limit the number of websites you can host. In your solution, systems with apache 1.3.x and more that 150 websites will get unstable.

ISPConfig uses another approach for logging that is much more scalable.

There is a custom logfile written to the directory

/var/log/httpd

that contains the access logdata for all websites. This logfile is splitted nightly by a cronjob and the splitted logs are appended to the web.log files in the log directorys of the websites before the webalizer script is run.
Reply With Quote
  #3  
Old 11th September 2005, 13:31
Lobanak Lobanak is offline
Junior Member
 
Join Date: Sep 2005
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thx for the fast answer.

I think the problem then was, that cron was not running.

But what script do the splitting? I want to run it manually now.

Greets

Lobanak
Reply With Quote
  #4  
Old 11th September 2005, 13:46
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

The script is:

/root/ispconfig/scripts/shell/logs.php

I recommend not run the script manually. It splits only the logfile of last day. If you run the script after 12 AM, the script will split todays logfiles.
Reply With Quote
  #5  
Old 11th September 2005, 19:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
 
Default

Quote:
Originally Posted by Lobanak
/root/ispconfig/scripts/shell/webalizer.php (started by cron) is searching for the file web.log in the log directory of the webs. But this file is not generated.
web.log should be a symlink to the actual file. The symlink does not exist either?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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
webalizer cron msg annoyance domino Server Operation 3 23rd September 2006 16:35
Webalizer - Usage by Country statistics leno Installation/Configuration 3 28th April 2005 18:12


All times are GMT +2. The time now is 03:20.


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