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
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
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>
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