<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[NuBlue - Viewing Development Websites Using Your Hosts File]]></title>
		<link>http://www.nublue.co.uk/forums/topic/243/viewing-development-websites-using-your-hosts-file/</link>
		<description><![CDATA[The most recent posts in Viewing Development Websites Using Your Hosts File.]]></description>
		<lastBuildDate>Thu, 09 Sep 2010 13:54:56 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Viewing Development Websites Using Your Hosts File]]></title>
			<link>http://www.nublue.co.uk/forums/post/652/#p652</link>
			<description><![CDATA[<h2>Editing your Hosts File in OSX</h2><p>To edit your hosts file on OSX you first need to open the terminal app. You can do this by start typing Terminal on the Spotlight, or by going into Applications -&gt; Utilities -&gt; Terminal.</p><p>Once the terminal is open you need open your hosts file for editing. You can do this by typing the following command into the terminal.</p><div style="padding: 10px 0 10px 0;"><pre class="brush: plain;">sudo nano /private/etc/hosts </pre></div><p>Type your user password when prompted.</p><p>Once the file opened, you will need to append your site details to the end of the file as with the windows guide above.</p><div style="padding: 10px 0 10px 0;"><pre class="brush: plain;">IP_ADDRESS    DOMAIN_NAME
IP_ADDRESS    www.DOMAIN_NAME</pre></div><p>When done editing the hosts file, press control-o to save the file, press enter on the filename prompt and control-x to exit the editor.</p>]]></description>
			<author><![CDATA[dummy@example.com (NuBlue-Luke)]]></author>
			<pubDate>Thu, 09 Sep 2010 13:54:56 +0000</pubDate>
			<guid>http://www.nublue.co.uk/forums/post/652/#p652</guid>
		</item>
		<item>
			<title><![CDATA[Viewing Development Websites Using Your Hosts File]]></title>
			<link>http://www.nublue.co.uk/forums/post/615/#p615</link>
			<description><![CDATA[<h2>Editing your Hosts File in Windows</h2><p>One method of previewing/developing a site that is not live (ie you&#039;re developing it on our server under its correct domain name, but the A record or nameservers point to a live site hosted elsewhere) is to edit your hosts file to bypass DNS and force your local machine to look for a domain on our hosting.</p><p>To do this you need to know your domain name, the IP address we&#039;re hosting it on (You can find this information in your Hosting Control Panel under Setup), and you&#039;ll need to have administrator privileges on your computer.</p><p>On Windows XP the hosts file is located within here : windows\system32\drivers\etc\hosts&nbsp; .&nbsp; The windows directory is most likely located on your C: drive, but if your computer setup differs from the norm it could be located elsewhere.</p><p>Navigate to this file in Windows Explorer, if you find you can&#039;t view any of the listed directories you will need to enable Hidden Program or System Files (See guide <a href="http://www.microsoft.com/windowsxp/using/helpandsupport/learnmore/tips/hiddenfiles.mspx" rel="nofollow">here</a>.&nbsp; Once located right click and choose to edit the file in Notepad.</p><p>Append to the bottom of the file the following 2 lines, replacing IP_ADDRESS with the IP Address you took from the Hosting Control Panel and DOMAIN_NAME with your domain : </p><div style="padding: 10px 0 10px 0;"><pre class="brush: plain;">IP_ADDRESS    DOMAIN_NAME
IP_ADDRESS    www.DOMAIN_NAME</pre></div><p>Here&#039;s an example using my domain name and using my correct IP address : </p><div style="padding: 10px 0 10px 0;"><pre class="brush: plain;">92.63.138.66    pagrant.co.uk
92.63.138.66    www.pagrant.co.uk</pre></div><p>Save the file and you&#039;re done (If you can&#039;t save the file then you won&#039;t have administrator privileges and you&#039;ll need to login as an administrator account).&nbsp; To test ping your domain and it should return the IP address you entered in the hosts file, not the live IP address.</p><p>To reverse, simply delete the two lines, save, flush your dns (ipconfig /flushdns in a command prompt) and retest using ping.</p>]]></description>
			<author><![CDATA[dummy@example.com (NuBlue-Paul)]]></author>
			<pubDate>Thu, 24 Jun 2010 12:13:51 +0000</pubDate>
			<guid>http://www.nublue.co.uk/forums/post/615/#p615</guid>
		</item>
	</channel>
</rss>

