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.

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:
    75
    Likes Received:
    2
    Trophy Points:
    8
    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:
    538
    Likes Received:
    15
    Trophy Points:
    18
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page