Super-lightweight server for ad redirecting

1

For most annoying ad sites I add mapping to 127.0.0.2 in /etc/hosts file and I use lighttpd binded to that ip to show empty page or empty image for requests (using regexp). Are there any alternatives, as lighttpd is not easy to update using macports (I need to deactivate and reactivate it)?

tig

Posted 2010-11-21T22:51:42.117

Reputation: 3 906

Sorry - voted to close prematurely. Please ignore my vote. – ChrisF – 2010-11-21T22:56:33.587

Answers

1

The simplest alternative is not to run a web server at all. This generally makes little difference in the browser, compared to returning an empty page.

Otherwise, lightweight web servers available through MacPorts include Abyss, Cheetah, Lighttpd, LWS, Mathopd, Mongoose, Monkeyd, Pico Server, Webfs, … It's hard to give a specific recommendation since you don't explain what you don't like about Lighttpd.

Gilles 'SO- stop being evil'

Posted 2010-11-21T22:51:42.117

Reputation: 58 319

Not running server will be slow as a lot of requests will be waiting to know that there is nothing at 127.0.0.2, also I use image with exclamation, so it is easy to know that there should be ad. Though, thank you for list of servers, I will try them. – tig – 2010-11-22T02:24:11.423

lighttpd is not easy to update using macports – Sathyajith Bhat – 2010-11-22T05:14:14.807

@tig: If you're not running a server, the negative response will be instantaneous (microscopically faster than if you are running a server, in fact). – Gilles 'SO- stop being evil' – 2010-11-22T18:34:08.653

My bad, I tried to access 127.0.0.3 without creating alias to lo0, so it was very long, with alias it really takes no time, but I found that System log gets Firewall entries about connection attempts to 127.0.0.3 from 127.0.0.1 – tig – 2010-11-22T19:25:19.650