Sudomains and log-files

Discussion in 'Installation/Configuration' started by OnTheRun, May 16, 2006.

  1. till

    till Super Moderator Staff Member ISPConfig Developer

    You will have to setup a web statistics program like webalizer or awstats that creates the statistics for you every day and you must rotate the logfile.
     
  2. bluethunder82

    bluethunder82 Member

    That part I understand. Right now I have webalizer installed. I am migrating from a Analog/Report Magic setup. Basically I am able to generate stats for each site however I am having difficulties getting my overview report generated which requires an overall log file.

    It looks like OnTheRun had a posssible solution for me.
     
  3. falko

    falko Super Moderator ISPConfig Developer

    If you want to have a statistic where all web sites are summed up, you can just copy the access_log file in /var/log/httpd (I think) to another location before it gets splitted up at 00:30h, and run Webalizer on this log file.
     
  4. OnTheRun

    OnTheRun New Member

    Hello,
    it seems to work just fine :)
    No I didn't do any other changes beside that directive.
    Is noticed, that on the domain, which I'm testing it, I have the stats in web_all.log, but not in the regular log anymore. So I assume the CustomLog directive in ISPConfig overwrites the one in the apache2.conf?
    If I add this:
    Code:
    CustomLog /var/www/webX/log_all/web.log common
    LogFormat '%v||||%b||||%h %l %u %t '%r' %>s %b '%{Referer}i' '%{User-Agent}i'' combined_ispconfig 
    CustomLog '|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d' combined_ispconfig
    do I have the stats for that site written on both? On web_all.log, plus on the ispconfig_acces_log, which generates me then the web.log for that domain again?

    Thank you very much and with kind regards
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Yes, that's right, hits for that particular web site are then logged in both logs.
     
  6. OnTheRun

    OnTheRun New Member

    Hi falko,
    thank you for your answer.
    I tried to add the lines mentioned above but apache comments them out and when starting apache he returns, that LogFormat takes two arguments.
    Maybe a typo? I now just added the two CustomLog-lines. Does this have any loss?

    EDIT: I noticed a strange behaviour: If I add the following directive under web4
    Code:
    LogFormat '%v||||%b||||%h %l %u %t '%r' %>s %b '%{Referer}i' '%{User-Agent}i'' combined_ispconfig
    CustomLog '|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d' combined_ispconfig
    CustomLog /var/www/web4/log_all/web.log common
    it works without any problems (if I check it in Vhosts_ispconfig.conf). Another domain (web63) had
    Code:
    php_flag register_globals on
    in the directive. If I add the code above under or above that directive
    Code:
    LogFormat '%v||||%b||||%h %l %u %t '%r' %>s %b '%{Referer}i' '%{User-Agent}i'' combined_ispconfig
    CustomLog '|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d' combined_ispconfig
    CustomLog /var/www/web4/log_all/web.log common
    php_flag register_globals on
    and restart apache it gets commented out:
    Code:
    # LogFormat '%v||||%b||||%h %l %u %t '%r' %>s %b '%{Referer}i' '%{User-Agent}i'' combined_ispconfig # NOT SUPPORTED!
    # CustomLog '|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d' combined_ispconfig # NOT SUPPORTED!
    # CustomLog /var/www/web4/log_all/web.log common # NOT SUPPORTED!
    # php_flag register_globals on # NOT SUPPORTED!
    Why does this happen? Under web4 it works, under web63 not, why this?

    With kind regards
     
    Last edited: Sep 15, 2006
  7. falko

    falko Super Moderator ISPConfig Developer

    Please make sure that mod_php is enabled in your Apache configuration.
     
  8. OnTheRun

    OnTheRun New Member

    Hello falko,
    thanks for your answer.
    Mod_php is enabled:
    Code:
    Loaded Modules 	core mod_access mod_auth mod_log_config mod_logio mod_env mod_setenvif prefork http_core mod_mime mod_status mod_autoindex mod_negotiation mod_dir mod_alias mod_so mod_cgi mod_include mod_perl [B]mod_php4[/B] mod_rewrite mod_ssl mod_suexec mod_userdir
    according phpinfo.
    I now just added:
    Code:
    CustomLog '|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d' combined_ispconfig
    CustomLog /var/www/web4/log_all/web.log common
    and for domains with mailman:
    Code:
    ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
    Alias /pipermail/ /var/lib/mailman/archives/public/
    CustomLog '|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d' combined_ispconfig
    CustomLog /var/www/web4/log_all/web.log common
    It seems to work like this. Is this ok?

    With kind regards
     
  9. falko

    falko Super Moderator ISPConfig Developer

    It's ok. If you want to turn on register_globals for a web site, use

    Code:
    php_admin_value register_globals On
    instead of

    Code:
    php_flag register_globals on
     

Share This Page