HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Another Awstats Configuration Thingy For ISPConfig (http://www.howtoforge.com/forums/showthread.php?t=6013)

asyadiqin 5th August 2006 02:42

Another Awstats Configuration Thingy For ISPConfig
 
Hi all,

OK, I managed to get Awstats to work with every sites I created using ISPConfig. Most of the changes are hardcoded and it might not work with every installation. I am not that good in PHP but I am learning :p

I do have a problem with a line of code in config.lib.php and I hope someone could help me.

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_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");

If you look at the above code, (Line 1542 - WEB_ERROR_LOG), that array is where ISPConfig added the line ErrorLog in the Vhost_ispconfig.php for all virtualhost on port 80. I tried to change that by adding a variable at the top

$error_log = "Hello";

and then used that in the array, as follows :-

WEB_ERROR_LOG => $error_log,

Now, instead of just

AddHandler cgi-script .pl
Hello
AddType application/x-httpd-php .php .php3 .php4 .php5


it becomes

AddHandler cgi-script .pl
ErrorLog Hello
AddType application/x-httpd-php .php .php3 .php4 .php5


Where does it get the ErrorLog thingy from?

asyadiqin 5th August 2006 02:59

OK .... Ignore the first post. I manage to find the template for the Vhost_ispconfig.conf file.

Like I said, I am trying to use Awstats with ISPConfig. I hope to be able to do this with separate logfiles for every virtualhosts. Once I manage to get Awstats to work, I will post it in this forum and hope that it will help everyone else who are trying to get Awstats to work with ISPConfig.

falko 6th August 2006 14:20

Have a look here: http://www.howtoforge.com/forums/sho...tats+ispconfig


All times are GMT +2. The time now is 16:49.

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