Author |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Mon 21 Sep '09 22:08 Post subject: Disable Logging For One Virtual Host |
|
|
With the old apache 1.3 you could do...
TransferLog None
Now if you do that it creates a file called "None" and logs to there... Is there a way to disable logging for one virtual host. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 22 Sep '09 14:22 Post subject: |
|
|
Just comment out the TransferLog line and there won't be any log file. |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Tue 22 Sep '09 17:01 Post subject: |
|
|
If I comment it out it will use the default log which is set in the httpd.conf file... I want the default logging for some of the other sites. But I have one really busy site which gets a gig of logs a day and prefer not to have all that being logged as it's eating up space.
There used to be a way to disable the logging with the old versions of apache. It's strange there does not seem to be a way to do this with the newer versions. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 22 Sep '09 17:31 Post subject: |
|
|
OK, I tested a bit and the following worked on a few requests. I did not tested it under load.
Error log I commted out, works. And the access log into nirvana.
#ErrorLog c:/logs/sandbox.error.log
CustomLog C:/nul common
Code: |
<VirtualHost *:80>
DocumentRoot c:/www_sandbox
ServerName sandbox.local
ServerAlias www.sandbox.local
#ErrorLog c:/logs/sandbox.error.log
#CustomLog /server2/logs/sandbox.access.log common
CustomLog C:/nul common
<Directory "c:/www_sandbox">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
|
|
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Wed 23 Sep '09 7:20 Post subject: |
|
|
Thanks,
It seems strange that the "None" does not work anymore. I wonder if there are any improvements because of this... |
|
Back to top |
|