Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)?

share|improve this question
    
Sorry - voted to close prematurely. Please ignore my vote. –  ChrisF Nov 21 '10 at 22:56
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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 Nov 22 '10 at 2:24
    
lighttpd is not easy to update using macports –  Sathya Nov 22 '10 at 5:14
    
@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 Nov 22 '10 at 18:34
    
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 Nov 22 '10 at 19:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.