I typically develop sites on my local machine using custom vhosts in Apache and adding lines to my
file to point custom urls to 1
/etc/hosts
. After some time that file grew to be large and sometimes tedious to update. Enter ghost gem. Simple hostname management.1
127.0.0.1
1
2
Waffles:~ clint$ ghost modify pup.local 127.0.0.1
[Modifying] pup.local -> 127.0.0.1
Adds a new entry (somewhere, not /etc/hosts though) and you can now use puppy.local as a url to point to your machine with a vhost setup to respond to that scheme.
You can use this for just about any url or IP you want too:
1
2
Waffles:~ clint$ ghost add puppy google.com
[Adding] puppy -> 74.125.65.105
shows what you have already:1
ghost list
1
2
3
4
Waffles:~ clint$ ghost list
Listing 2 host(s):
pup.local -> 127.0.0.1
puppy -> 74.125.65.105
Full details and commands are listed on bjeanes github repo.