Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Disabling access logs in httpd.conf



8:42 pm on Apr 12, 2008 (gmt 0)

10+ Year Member

Hi there,

I don't want Apache to write access logs, so I made a change like this:

#CustomLog logs/access_log combined
CustomLog /dev/null combined

..and also commented out CustomLog directives in Virtual Hosts.

I think that will prevent Apache to write the log files, but the problem is it will still use cpu resources, am I wrong there?

If that's the case, will something like this work?

LogFormat "" combined
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

What I'm using here is an empty log format:

LogFormat "" combined

but on a really old forum (of about 10 years ago) :) a guy said it won't work?

What do you think?


5:40 am on Apr 13, 2008 (gmt 0)

10+ Year Member


# /etc/rc.d/init.d/httpd start
Starting httpd: Syntax error on line 485 of /etc/httpd/conf/httpd.conf:
LogFormat takes 1-2 arguments, a log format string (see docs) and an optional format name

nope... I think I will add at least 1-2 arguments there..


3:44 pm on Apr 14, 2008 (gmt 0)

10+ Year Member

I have changed it as:
LogFormat "%h" combined

and using:
CustomLog /dev/null combined

It's OK now.


1:37 am on Apr 15, 2008 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I don't think I've ever seen anyone want to disable their logs completely before... :)

But thanks for posting your solution.



Featured Threads

Hot Threads This Week

Hot Threads This Month