When you run a webserver behind a reverse proxy or HTTP accelerator like Squid or Varnish, the webserver access logs will display the IP of the proxy (generally 127.0.0.1) instead of the end user’s IP. This not only breaks any kind of tracking or reporting you want to run against your webserver logs, but it also takes away a datapoint I’ve had use for in general server admin tasks. This server runs Varnish in front of Lighttpd, and it reveals the end user’s IP in the header as X-Forwarded-For, so it’s just a matter of making Lighttpd (lighty) use that variable in its access logs instead of the default variable defining the referring IP. Once we know that, the configuration is simple; in lighttpd.conf, enter this:
Recent Comments
- David Foster on Super Mario Bros voted greatest computer game ever
- Sonomadiver on HOWTO: replicate, backup, copy or move a mySQL database
- m2m news on LinkedIn is spamming all of my Gmail contacts
- LDN Games on HOWTO build your own open source Dropbox clone
- Rinkesh on Aquadots sweetened with the date-rape drug 1,4-butanediol
Tags
apache apple art bands barack obama bash bsd code debian dubya eff election email features gamer google hacker health howto lighttpd linux mp3 music networking newstudy obama open source phishing politics president rock rock and roll security spam tech terror tv ubuntu unix varnish video games vote web webserver wii












Home