Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Stop access log creation for (sub)domain

Discussion in 'General Discussion' started by PatrickVeenstra, Jun 18, 2016.

  1. PatrickVeenstra

    PatrickVeenstra Well-Known Member

    Joined:
    Feb 12, 2012
    Messages:
    104
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Barcelona
    cPanel Access Level:
    Root Administrator
    One of my subdomains receives a LOT of requests, and because of that it always has a very big logfile. There's nothing in that log that can be of any interest to me, so: is it possible to not create an log for a specific subdomain / domain / account?
     
  2. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    555
    Likes Received:
    16
    Trophy Points:
    168
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sure, though I have no idea how long it'll stick around. This would probably be a good idea for feature requests , honestly.

    Login to SSH (root)
    In /usr/local/apache/conf/httpd.conf, find the lines something like this:

    Code:
      CustomLog /usr/local/apache/domlogs/sub.domain.com combined
      <IfModule log_config_module>
        <IfModule logio_module>
          CustomLog /usr/local/apache/domlogs/sub.domain.com "%{%s}t %I .\n%{%s}t %O ."
        </IfModule>
      </IfModule>
    
    Rip 'em out, entirely. Delete 'em ;)

    then run
    Code:
     /usr/local/cpanel/bin/apache_conf_distiller --update 
    
    Then backup your httpd.conf
    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd-backup.conf
    
    Then run
    Code:
    /usr/local/cpanel/bin/build_apache_conf  
    
    and verify that the changes you made are still there. If so, one final command.

    Code:
    service httpd restart
    
    I'm fairly certain that's good for both ea3 and ea4, but someone will correct me if I'm wrong.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,301
    Likes Received:
    1,847
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice