Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: SetEnvIf variable not working (cannot disable logging) |
|
Author |
|
aivars
Joined: 10 Dec 2006 Posts: 4
|
Posted: Mon 01 Jan '07 21:05 Post subject: SetEnvIf variable not working (cannot disable logging) |
|
|
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: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 04 Jan '07 10:46 Post subject: |
|
|
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
|
Posted: Fri 05 Jan '07 5:48 Post subject: |
|
|
Hello Bond,
Did what you advised. setenvif.so is loaded.
But apache still logs localhost and my laptop.
Thanks, any other ideas?
Aivars |
|
Back to top |
|
|
|
|
|
|