Created
February 1, 2013 03:24
-
-
Save stovak/4688918 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The file /etc/hosts controls the "known" hosts to your mac. You can hijack a website and tell it to use a specific server by defining a websites IP address in your /etc/hosts. | |
Open a terminal session on your mac and type: | |
`sudo nano /etc/hosts` | |
Hit the down arrow until you get to the end of the file. | |
Entries in /etc/hosts take the following syntax | |
`<IP Address>[space]<hostname>` | |
for example: | |
`192.168.2.33 myintranetserver.mydomain.com` | |
If you're on a windows machine, you need to put a couple of extra returns in the /etc/hosts file because windows will not read whatever's on the last line. The correct Entries are as follows: | |
`107.23.204.16 apigee.com` | |
`107.23.204.16 blog.apigee.com` | |
Exit nano by hitting <control>-x and saving the file. | |
then flush the cache: | |
`sudo dscacheutil -flushcache` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment