To prevent web browsing tracking you can trick tracking scripts by serving our own files that does nothing.
Such setup is perfect in combination with browser utilities such as Ghostery that sits in the web browser and blocks known tracking servers.
An interesting article on the same topic can expand more on the subject.
Add a few intries in your local computer hosts
file. This file is used by the operating system to get to know which IP address to use for given names. The hosts
file is common for most modern operating systems; Windows, Mac OS, Linux, etc.
The number 127.0.0.1
is the IP address of your local computer. An entry looks like this
127.0.0.1 adadvisor.net
A few sites provide a list of hosts file, you can make
To edit a system protected file, I suggest you take a look at the directives in the following articles
To enable local web server, you can take a look at the following articles
- http://osxdaily.com/2012/09/10/enable-php-apache-mac-os-x/
- http://php.net/manual/en/install.macosx.bundled.php
You can add the following lines in /private/etc/apache2/other/php5.conf
. If the file doesn’t exist, you can create it.
ServerTokens Prod
<VirtualHost _default_:80>
ServerName localhost
DocumentRoot "/Library/WebServer/Documents"
ErrorLog "/private/var/log/apache2/hosts-error_log"
CustomLog "/private/var/log/apache2/hosts-access_log" common
LoadModule php5_module libexec/apache2/libphp5.so
AddType application/x-httpd-php .php
<Directory "/Library/WebServer/Documents">
DirectoryIndex index.php
ErrorDocument 404 /index.php
ErrorDocument 403 /index.php
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>