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!

Disable logging for specific folder on specific domain

Discussion in 'EasyApache' started by morrow95, Jun 27, 2017.

  1. morrow95

    morrow95 Well-Known Member

    Oct 8, 2006
    Likes Received:
    Trophy Points:
    I have a bunch of php scripts in a specific folder on one of my domains which are constantly accessed (20+ hits a second) and would like to disable access logging for all of them (the folder). I am using CentOS 6 with Apache 2.4.

    I found information on how to do this using environment variables and modifying the host file (Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation), but I am not sure how to customize this for my needs.

    I want to disable logging for /home/username/public_html/folder1/ (everything in it).


    I accomplished this with :

    <IfModule mod_userdir.c>
    SetEnvIf Request_URI "^/folder1/" dontlog
    CustomLog /usr/local/apache/domlogs/ combined env=!dontlog

    'username' and '' represent their actual values in the above.
    #1 morrow95, Jun 27, 2017
    Last edited: Jun 28, 2017
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    I'm glad to see you were able to get it working. Thank you for updating us with the solution you used.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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