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.

CustomLog env=!dontlog being ignored

Discussion in 'EasyApache' started by destryhines, Apr 9, 2016.

  1. destryhines

    destryhines Registered

    Joined:
    Apr 9, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Antonio, TX
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm trying to setup one of my virtual hosts to not log page hits to a web service. This page gets hit very frequently and I do not want to fill up the logs unnecessarily. I believe I have everything setup correctly but it seems apache is ignoring the CustomLog directive I'm using to turn off logging and it's logging anyhow.

    I've identified the vhost config file location and created an include conf file for it in a file here: /usr/local/apache/conf/userdata/std/2/dcma/httpd.conf

    Code:
    <IfModule mod_log_config.c>
        # Mark requests for the AJAX call
        SetEnvIf Request_URI "^/score" dontlog
        # Log what remains
        CustomLog logs/access_log common env=!dontlog
    </IfModule>
    I've also put a PHP script in the "/score" directory and verified that the "dontlog" environment variable is being set to "1", so I know I have the config file working and the SetEnvIf code working.

    When I go to the access-logs folder (/home/dcma/access-logs) and tail the log file, I still see the entries for page hits.

    It seems like apache is ignoring what I'm setting. I've also tried going into WHM->Main->Service Configuration->Apache Configuration->Include Editor and tried adding the above code to all 3 locations. Still logs the page hits.

    What the heck am I missing here?

    Here is the environment I'm working with:

    /etc/redhat-release:CentOS release 5.8 (Final)
    /usr/local/cpanel/version:11.52.5.0
    /var/cpanel/envtype:standard
    CPANEL=11.52
    bash: httpd: command not found
    PHP 5.4.24 (cli) (built: Jan 17 2014 09:34:55)
    Copyright (c) 1997-2013 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd.
    mysql Ver 14.12 Distrib 5.0.96, for pc-linux-gnu (i686) using readline 5.1

    --Destry
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. destryhines

    destryhines Registered

    Joined:
    Apr 9, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Antonio, TX
    cPanel Access Level:
    Root Administrator
    I'm not using Nginx, and I don't know of any third-party apps that might be interfering. Here's what apache says:

    Server Version: Apache/2.0.64 (Unix) mod_ssl/2.0.64 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
    Server Built: Jan 17 2014 09:28:40

    It is an older server but I would think it should still work.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Is there anything in-particular keeping you from updating to a supported version of Apache? Apache version 2.0 reached "End of Life" in 2013, so we have discontinued support for Apache version 2.0. EasyApache no longer includes an option for Apache version 2.0.

    Thank you.
     
  5. destryhines

    destryhines Registered

    Joined:
    Apr 9, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Antonio, TX
    cPanel Access Level:
    Root Administrator
    I upgraded the server to 2.4.18 and I'm still having the same issue. I verified that the config file is still working. Here is my new version:

    Server Version: Apache/2.4.18 (Unix) OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
    Server MPM: prefork
    Server Built: Apr 11 2016 20:35:52
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  7. destryhines

    destryhines Registered

    Joined:
    Apr 9, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Antonio, TX
    cPanel Access Level:
    Root Administrator
    Here is the ticket #7519567

    Thanks!
     

Share This Page