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: SetEnvIf variable not working (cannot disable logging)
Author
aivars



Joined: 10 Dec 2006
Posts: 4

PostPosted: Mon 01 Jan '07 21:05    Post subject: SetEnvIf variable not working (cannot disable logging) Reply with quote

Hello and happy new year to all,

i am trying to avoid logging requests from my laptop and local host to my access.log file. I have put the follwong entries in httpd.conf as per apache 2.2 documentation:

# Mark requests from the loop-back interface
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
SetEnvIf Remote_Addr "192\.168\.0\.101" dontlog
# Log what remains
CustomLog logs/access_log common env=!dontlog

I also have mod_log_config.so and mod_setenvif.so loaded (enabled).

But apache still keeps logging all requests. Google search comes up with the same examples from apache documentation.
I have restarted apache many many times after changes in .conf file

I am using WinXP SP2, Apache2.2.3, PHP 5.2

Thanks,
Aivars
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Thu 04 Jan '07 10:46    Post subject: Reply with quote

Hello,

I have tested your settings and here they are working great.

1) if you have installed apache as service stop it. if not ignore this
2)start apache from the command line (cmd) httpd -e debug
3)see if is mod_setenvif.so is loaded.
Back to top
aivars



Joined: 10 Dec 2006
Posts: 4

PostPosted: Fri 05 Jan '07 5:48    Post subject: Reply with quote

Hello Bond,
Did what you advised. setenvif.so is loaded.
But apache still logs localhost and my laptop.
Thanks, any other ideas?

Confused
Aivars
Back to top


Reply to topic   Topic: SetEnvIf variable not working (cannot disable logging) View previous topic :: View next topic
Post new topic   Forum Index -> Apache