skip to Main Content

I want to provide privacy to my visitors by not logging the IP or useragent.

I have tried to use the .htaccess for this but can’t get it to work, for example with

SetEnvIf Remote_Addr “*” dontlog

This resulted in a 500 error of course. I am a bit of a novice, so not very familiar with syntax etc..

What is the best way to instruct the server to not log request for any visitor, with htaccess or any other way?

Appreciate any feedback / ideas.

Cheers,

Fred

  • CentOS 6 with Plesk Panel 10
  • 1and1.co.uk host, using Server L 4 Linux Standard
  • Using php for website

2

Answers


  1. If you have access to the main virtual host configuration in Apache, instead of specifying the AccessLog or ErrorLog path, do:

    ErrorLog /dev/null
    AccessLog /dev/null
    

    But you said you were at 1&1 which is normally a shared hosting provider. According to the Apache documentation, you cannot override ErrorLog, AccessLog or CustomLog from the .htaccess

    Login or Signup to reply.
  2. In the setting.php , try adding

    $_SERVER['REMOTE_ADDR']='0.0.0.0';
    

    It may not be right method, hope it can be a Plan B 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search