If you take a close look at your logs you may occasionally see requests for a file named wpad.dat
. This file is related to automatic proxy configuration in many browsers.
To provide this capability to your users and website,
- DNS:
Default behavior is to traverse the domain in reverse, looking for one with a file named
/wpad.dat
Example (using my domain for example):
wpad.www.giantgeek.com
wpad.giantgeek.com
wpad.com - Then in httpd.conf, set the MIME type:
AddType application/x-ns-proxy-autoconfig .pac
- Also in httpd.conf, add a redirect to the actual file you wish to use.
Redirect permanent /wpad.dat http://www.giantgeek.com/proxy.pac
- In the new file, add the following default contents, modify if you use a proxy:
/* 'proxy.pac' - This is the main function called by any browser
NOTE: there is NO proxy!
*/
function FindProxyForURL(url, host)
{
return “DIRECT”;
} // End function FindProxyForUrl
REFERENCES: