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.

Is there a way to make apache logs count or consume site storage capacity?

Discussion in 'EasyApache' started by eurorocco, Apr 12, 2005.

  1. eurorocco

    eurorocco Well-Known Member

    Joined:
    Jun 23, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Hi!

    Is there a way to make apache logs take space used by apache logs into account against sites' quota?

    I have a number of sites hosted that use little storage in their /home directory , but use lots of storage in their respective apache logs in /usr/local/apache/domlogs .

    For instance, x.com with /home/x with 50MB, but /usr/local/apache/domlogs/x.com using 800MB. I would like the site to report that it is using 850MB, home and logs combined. Currently the way things work it just reports that it is using 50MB, with whatever the home folder has, but this site weights a lot more in reality.

    I am in desperate need to accrue revenue from high-traffic sites in a clear, quantifiable way; to justify to the customer the need for a semidedicated or dedicated server for them, and thus sell more Cpanel licences! :)

    I have thought about backups also counting towards site usage, but I think just counting apache logs would be a great improvement, business-wise, or so it seems.

    Thanks for your help finding out if this is possible.

    ER
     
    #1 eurorocco, Apr 12, 2005
    Last edited: Apr 12, 2005
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    The first thing that people tend to consider when running low on disk space is to delete the odd file here or there that is not needed or clear out some unwanted mail.

    Unless I am wrong, an account holder won't be able to delete "their" logs in /usr/local/apache/domlogs/ - it would therefore be a little unfair to include in disk space quota files over which the account holder has no control.
     
  3. eurorocco

    eurorocco Well-Known Member

    Joined:
    Jun 23, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    But they actually do have control...

    You bring up an excellent point... namely the "fair or unfair" question, which is a fundamental question in all this.

    Customers do actually have control over the size of those logs. If the fill up their public_html folder with porn, anime, downloads, freebies, mp3s and the like... if they send mass emailing... if they keep outdated and insecure php scripts... they will certainly end up with huge logs. If they keep their sites lean, their web logs will be lean too. What I am saying that in my opinion they do have control over the size of the web logs, indirectly though, asynchronously though. :)

    On the other hand, I think the fairest thing is to have the customer pay for dedicated servers when their sites demand, and fairest for us as providers to clearly define what is the boundary of some shared hosting plan. Right? :)

    ER
     
    #3 eurorocco, Apr 12, 2005
    Last edited: Apr 12, 2005
  4. eurorocco

    eurorocco Well-Known Member

    Joined:
    Jun 23, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    A workaround...

    I made a copy of all the files in /usr/local/apache/domlogs belonging to the site into /home/x/logs/

    I guess it is a workaround, but truly, if logs counted customers could see their site needs a bigger service plan, possibly a dedicated server. I would make "resource consumption" clearer to them.

    I do remember back in the times of Ensim, it did count logs against site quotas. If I remember correctly.

    ER
     
  5. eurorocco

    eurorocco Well-Known Member

    Joined:
    Jun 23, 2003
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    2nd workaround...

    How about this 2nd worakround?

    Assume site is animeblabla.com and cpanel user is anime

    chown anime:anime /usr/local/apache/domlogs/animeblabla.com
    mkdir /home/anime/logs
    chown anime:anime /home/anime/logs
    ln -s /usr/local/apache/domlogs/animeblabla.com /home/anime/logs/animeblabla.com

    This makes the log file for the site be accounted for in site quota and the user does get to see the log, if they wanted to. They could overwrite and even delete the links.

    I am testing this workaround.

    Thanks!

    ER
     
Loading...

Share This Page