Latest member reviews of listed products

  • Apple 23-inch Cinema Display

    04display_fam1.jpgReview: My Cinema Display is amazing. I have enjoyed it so much all these months that I couldn't ask for more, other than another one to have…

  • Apple Apple TV

    appletv_frnt_rem.jpgReview: The Apple TV is a great addition to Apple's hardware for our Digital Life. I love my Apple TV and use it all the time. I watch all…

  • Apple iWork 08

    iwork08_box.jpgReview: I think I will never go back to using Microsoft Office thanks to Apple's new iWork, and Pages bundles. These are some of the best programs…

  • Apple iPhone

    0706iphone_main.jpgReview: Overall I love the iPhone. I use it a lot, all of the features all the time. Something that I never did when I owned a Palm 700p.…

Check out our Product Reviews Section

Tips & Tricks

Friday, January 25th, 2008 at 12:42 am
By Marco Sebastian

I’m a web developer, and sometimes I need to do things that require a lot of research to find. Recently, I stumbled on simple post that solved an issue I was trying to solve for days.

sudo nano /etc/hosts

What does that do?

When you launch the terminal and input that line, and your admin password, you will get and editor which houses the hosts file. Below the line “::1 localhost” you input an IP address following a website address.

Something like this:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
44.55.66.765 www.mymacproduct.com

This is very cool in many ways. I use it for masking websites to call a different server when loading a particular domain. What this enables me to do is keep the original site running on its original server. While I install and create the new site on a new server. Technically, no one can see it, unless they know the IP and which site is being edited.

How is this useful? Why don’t you just use the IP and work on the site that way you might ask?

Well, when installing scripts, it requires me to input directories, addresses, the URL of the website, etc. This can be a huge hassle if creating a large site, because it will require editing all the scripts to make sure they are linking to everything correctly. However, masking a site like I explained, any changes to the scripts can be done as if I was working on the live site. Once the site is ready, all I do is switch the DNS Server name from whatever domain company its located in.

Filed under Tips & Tricks. You can follow any responses to this article through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply


MyMacProduct.com © 2007. All Rights Reserved. Site Designed by Marco Sebastian. Chief Editors, Oscar and Marco. News powered primarily by WordPress. Trademarks and multimedia shown or mentioned in MyMacProduct.com are property of their respective owners. MyMyProduct.com is Valid XHTML 1.0 Strict.