The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Too many log files in httpd.conf

Discussion in 'General Discussion' started by hardjoko, Jun 22, 2005.

  1. hardjoko

    hardjoko Active Member

    Joined:
    Jun 22, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    We know that if we create subdomain names than there will be too many httpd.conf in the virtual host. Now if we have too many logs file in the virtual host, than Apache won't run.

    Is there a way so that whm do not create log files line in virtual host?

    So that lines like

    BytesLog domlogs/***.com-bytes_log
    CustomLog domlogs/***.com combined

    is not written everytime I created virtual hosts?


    Jim
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you dont' want those entries (and of course don't want to track bandwidth as that is what is used) then you should edit /scripts/wwwacct and modify the default VirtualHost container. you'll need a watch script to check wwwacct as it will be updated whenever upcp is run.
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That would be my watchwwwacct script, if you decide to modify it. My scripts link is in my sig below.
     
  4. hardjoko

    hardjoko Active Member

    Joined:
    Jun 22, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Thanks a lot.

    What is UPCP?

    If the only reason why it's used is bandwith, than yea I don't need it. I have 1200G bandwith per month.

    However, if it's for awstats and stuff than I may need it.
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Those files are used to track bandwidth and to generate stats. Without them you have no record of visits.

    Upcp is used to mean the script /scripts/upcp which is cpanels upgrade script. It's either set to do updates manually or automatically, but either way the script runs every day and sometimes rewrites certain files, like the wwwacct script.
     
  6. hardjoko

    hardjoko Active Member

    Joined:
    Jun 22, 2005
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Hm... You mean I won't get awstats, etc.

    Allright for the deleting:

    I saw these lines

    if (-e "/usr/local/apache/libexec/mod_log_bytes.so") {
    system("/scripts/initbyteslog");
    }


    print HTTPDCONF "CustomLog $logdir/$domain combined\n";

    print HTTPDCONF "CustomLog $logdir/$domain combined\n";

    Should I delete those?
     
  7. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Just comment out the 2 print lines. Change this:
    Code:
    if ($logstyle eq "combined") {
    	print HTTPDCONF "CustomLog $logdir/$domain combined\n";
    } else {
    	print HTTPDCONF "TransferLog $logdir/$domain\n";
    }
    
    to:
    Code:
    if ($logstyle eq "combined") {
    #	print HTTPDCONF "CustomLog $logdir/$domain combined\n";
    } else {
    #	print HTTPDCONF "TransferLog $logdir/$domain\n";
    }
    
    then you will want to go to http://www.premierwebsitesolutions.com/scripts/monitor/ so you don't have to redo the changes after every upcp.
     
Loading...

Share This Page