How to setup a second-level local domain for a development environment?

Add the following line to an operating system’s hosts file:

127.0.0.1 localhost.com

See also: