Anvil is described as 'takes your site folder, gives it a .dev URL and makes it run for you. Works for any static HTML sites and Rack apps' and is a Web Server in the File Sharing category. There are four alternatives to Anvil for Mac. The best alternative is Gas Mask, which is both free and Open Source. Other great apps like Anvil are Hosts.prefpane (Free, Open Source), Knerve (Free) and VirtualHostX (Paid).
When an entry is toggled off, it is not commented out in the hosts file, but instead stored in the app's preferences storage. This means you will have to uncomment all your unused host entries and untoggle them in the prefpane if you want to use them.
A tiny menubar app for OS X that gives you .dev domains, PHP support and HTTPS and does it without doing a thing to your system. It's 100% runtime so while it isn't running it might well have never been there.
VirtualHostX 4.0 is the easiest way to host and share multiple websites on your Mac. It's the perfect solution for web designers working on more than one project at a time. With VirtualHostX you can easily create and manage Apache virtual hosts with just a few clicks.