1) Right click on notepad and click run as administrator then
2) Do file… open and browse to windows/system32/drivers/etc/ (choose all file types in the type area) then choose the hosts file
3) Then add
AND change yourdomain.com to your ACTUAL domain name :)
And then save the file.
OR download this great tool http://www.abelhadigital.com/hostsman which lets you toggle back and forth.
- Launch Terminal , found in /Applications/Utilities/ or launched through Spotlight
- Type the following command at the prompt:
sudo nano /private/etc/hosts
- Enter the administrator password when requested, you will not see it typed on screen as usual with the command line
- Once the hosts file is loaded within nano, use the arrow keys to navigate to the bottom of the hosts file to make the ip changes shown above
- When finished, hit Control+O followed by ENTER/RETURN to save changes to /private/etc/hosts, then hit Control+X to exit out of nano
- Quit out of Terminal when finished
Well since there are a lot of different flavours of Linux its hard to post actual instructions, but here is how to do it from command line in general
1. vim /etc/hosts (or your other favourite editor, I prefer nano)
2. and then when you are done with editing ... hit escape button twice and the type :wq to save and exit!!
now when you pull up the site in a browser it will be accessing from our server instead so you can test and see if its working ok.