Our Blog

Ongoing observations by End Point people

Custom Apache log to only show HTML requests

Ron phipps

By Ron Phipps
April 6, 2012

Today while working on an AJAX issue for CollegeDistrict.com I came across a need to only see HTML requests to Apache while leaving out all of the many requests for images, CSS, and JavaScript files. This would make it quite easy to see when AJAX requests were making it through properly.

I found a solution which worked well and used these settings in our development httpd.conf:

SetEnvIf Request_URI "(\.html|\.shtml)$" html
CustomLog logs/html.log common env=html

apache sysadmin


Popular Tags


Search our blog