I’ve done a fair amount of web “design” (mostly implementing designs of others) and development in the past, I usually set up a lot of virtual hosts in my local apache. I’ve done that in three different ways.
The quick&dirty hosts file
Point any of your development domains to 127.0.0.1 in the /etc/hosts file. It’s the easiest way, but you need to add them one by one. At some point, mine could look like this:
127.0.0.1 warp.dev 127.0.0.1 ebox-platform.dev 127.0.0.1 ebox-technologies.dev 127.0.0.1 jorgebernal.dev 127.0.0.1 projectA.dev # ... and so on
Getting smart with dnsmasq
This is a more automated method. You install dnsmasq and configure 127.0.0.1 as your DNS server. Then add this to your conf:
This worked well, and acted as a dns cache. But I had some trouble with dynamic dns entries at our old office: projects.warp.es would point to a local address inside the office and our remote IP from outside, so I found myself clearing the cache too often.
42foo: the zero-code web service
So I made it external. I bought 42foo.com and set up a bind zone with this:
@ A 127.0.0.1 * A 127.0.0.1
So warp.42foo.com, ebox-platform.42foo.com or whateveryourprojectis.42foo.com always point to 127.0.0.1
You still have to set up the virtual host, but there is one step less for web development. Feel free to use it, and let me know if you set up something similar with a shorter domain name