Knowledgebase: Hosting FAQ > General
How can I access/test my 'new' site before moving my production site to you? (Mac)
Posted by - NA -, Last modified by Jen Ferraz on 29 January 2013 09:03 AM

========================================================
How can I access/test my 'new' site before moving my production site to you? (Mac OS)
========================================================

Due to the differences in Mac OS X versions, there are different ways to setup a HOSTS file.

Method 1: The Easy Way (OS X 10.2 "Jaguar" and 10.3 "Panther")


* Create your "hosts" text file. Call it "hosts" - all lower-case. The contents of the file should be the following, substituting 1.2.3.4 for your IP address provided by Hostasaurus and substituting newsite.com for your domain name:

1.2.3.4 newsite.com
1.2.3.4 www.newsite.com

* Save the "hosts" file in your "/etc" directory. You will need to be root on the system or using sudo to access this directory.

* Run the following command:

sudo killall -HUP lookupd

* Close any open web browser and email software, and reopen. You should now be able to access your Hostasaurus site by domain name as if it were 'live'. Remove the "hosts" file from "/etc" and rerun "sudo killall -HUP lookupd" when finished.



Method 2: The Not-So-Easy Way (Mac OS X 10.X)

If Method 1 didn't work for you, the altenate method is more involved:


* Create a file named 'Hosts' including the capital H. The contents of the file should be the following, substituting 1.2.3.4 for your IP address provided by Hostasaurus and substituting newsite.com for your domain name:

newsite.com A 1.2.3.4
www.newsite.com A 1.2.3.4

* On PRE Mac OS X, your Hosts file goes in the System Folder:Preferences folder. Reboot and you should be accessing the new site instead of the live site.

* On MacOS X, the file goes in /etc/ but there is a lot more to do, so continue on.

o Create a file in /tmp/ called lookupd.txt and place the following text in it:

{
"LookupOrder" = ( "FFAgent", "CacheAgent", "NIAgent", "YPAgent" );
"name" = ( "lookupd" );
"MaxThreads" = ( "12" );
CHILDREN = (
{"name" = ( "groups" );
"LookupOrder" = ( "FFAgent", "CacheAgent", "NIAgent" );
},
{"name" = ( "users" );
"LookupOrder" = ( "FFAgent", "CacheAgent", "NIAgent");
},
{"name" = ( "hosts" );
"LookupOrder" = ("FFAgent", "CacheAgent", "NIAgent", "DNSAgent", "NILAgent" );
},
{"name" = ( "netgroups" );
"LookupOrder" = ( "FFAgent", "CacheAgent", "NIAgent");
}
)
}



o Run the following command: niutil -create . /locations/lookupd

o Run the following command: niload -r /locations/lookupd . < /tmp/lookupd.txt

o The command "lookupd -d" will inspect your work. Go ahead and reboot and see if you can now access your site served from Hostasaurus.Com instead of the current provider.




(2 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako support.miva.com/supportsuite/index.php?