Multiple Domains on a Single Host


So the problem is simple. We’re developing one, or a number of sites on our development box. We would like to be able to hit them in our browser via their url names, rather than various permutations of ip number and folder structure.

I do my development on a Mac, so this solution is for OS X. The first step is to go into:

/etc/hosts

in a text editor, and assign the url to the loop-back address (you can just put it under all the other entries):

127.0.0.1 my-ghost-blog.com

No that this is done, we next need to flush our dns cache using the following command in the terminal:

dscacheutil -flushcache

OK, now we can go to:

myghost-blog.com

in our web browser, and it will bring up our local running instance of ghost.


This is a well known problem, and has a well known solution. The more of these solutions there are across the web, the greater the chance they will be found by any number of different key words.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s