logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Disable Logging For One Virtual Host
Author
Thog



Joined: 12 Feb 2007
Posts: 75
Location: Montreal

PostPosted: Mon 21 Sep '09 22:08    Post subject: Disable Logging For One Virtual Host Reply with quote

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

PostPosted: Tue 22 Sep '09 14:22    Post subject: Reply with quote

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

PostPosted: Tue 22 Sep '09 17:01    Post subject: Reply with quote

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

PostPosted: Tue 22 Sep '09 17:31    Post subject: Reply with quote

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

PostPosted: Wed 23 Sep '09 7:20    Post subject: Reply with quote

Thanks,

It seems strange that the "None" does not work anymore. I wonder if there are any improvements because of this...
Back to top


Reply to topic   Topic: Disable Logging For One Virtual Host View previous topic :: View next topic
Post new topic   Forum Index -> Apache