Problem with stats AWStats and subdomains

Discussion in 'General' started by MaDJiK, Sep 12, 2013.

  1. MaDJiK

    MaDJiK New Member

    Problem with stats and manually created subdomains


    I have some domains with a lot of subdomains *, but not in the same directory as So I add a Apache config file to add the subdomains. No problem.

    But how can I set the logs in the same access.log file that ISPConfig?

    Is it something like in the ispconfig.conf file:
    CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" /var/log/ispconfig/httpd" combined_ispconfig

    I have set:
    CustomLog /var/log/ispconfig/httpd/ combined_ispconfig

    it's OK immediatly, but sometimes it stops working and logs are lost. :confused:
    Last edited: Sep 12, 2013
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This line loggs all vhosts, the ones created by ispconfig and also ones that you created manually. The log files are stored by domain name in /var/log/ispconfg/httpd/
  3. MaDJiK

    MaDJiK New Member

    Do you mean created manually, but in ISPConfig?

    Or I can remove all the lines "CustomLog ..." it will be done automatically? in the same log as the domain created in ISPConfig?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The customlog directive creates logfiles for any vhost on your server, it does haow you created it.
  5. MaDJiK

    MaDJiK New Member

    OK, I will try to delete my lines.
    Thank you. :)
  6. MaDJiK

    MaDJiK New Member

    No, the logs files do not change when I delete my CustomLog instructions...

    My Apache config for each new subdomain is like:
    <VirtualHost *:80>
    	DocumentRoot /var/www/
    	[I]# CustomLog  /var/log/ispconfig/httpd/ combined_ispconfig[/I]
    	ErrorLog  /var/log/ispconfig/httpd/

    And I understand why
    CustomLog /var/log/ispconfig/httpd/ combined_ispconfig

    does not work correctly: the link access.log changes everyday, but not for Apache. So I need to indicate the real file with YYYYMMDD-access.log. :confused:
  7. MaDJiK

    MaDJiK New Member

    Oh, yes but it creates logs with the ServerName, but I neeed the same log, ie only
    A solution? :confused:
  8. MaDJiK

    MaDJiK New Member

    I think I find a solution. :) I will see tomorrow if rotation is correct, but I defined several new LogFormats for my subdomains, with the domain in plain text:

    LogFormat " %v %h %l %u %t \"%r\" %>s %B \"%{Referer}i\" \"%{User-Agent}i\"" combined_kiao
    (new name)

    vlogger create the directory based on the fist argument, so all subdomains using this format are stored in the same directory. That's what I wanted.

Share This Page