<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Small Program Blog &#187; DNS</title>
	<atom:link href="http://blog.sunnycyk.hk/?feed=rss2&#038;tag=dns" rel="self" type="application/rss+xml" />
	<link>http://blog.sunnycyk.hk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 05 Nov 2011 06:32:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mac OSX: Add Hosts to Local hosts file</title>
		<link>http://blog.sunnycyk.hk/?p=358</link>
		<comments>http://blog.sunnycyk.hk/?p=358#comments</comments>
		<pubDate>Mon, 14 Sep 2009 08:01:38 +0000</pubDate>
		<dc:creator>Sunny</dc:creator>
				<category><![CDATA[Mac Stuff]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[VM]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://blog.sunnycyk.hk/?p=358</guid>
		<description><![CDATA[I was in the hospital for awhile, so I have not had a chance to update my blog.  
Yesterday I installed OpenSuse to my VM on my Mac Pro because I wanted to play with Magento, so I installed Apache, PHP, and mySQL with all necessary modules.  Everything is going well, and Magento(1.1.3) [...]]]></description>
			<content:encoded><![CDATA[<p>I was in the hospital for awhile, so I have not had a chance to update my blog.  </p>
<p>Yesterday I installed OpenSuse to my VM on my Mac Pro because I wanted to play with Magento, so I installed Apache, PHP, and mySQL with all necessary modules.  Everything is going well, and Magento(1.1.3) finally installed successfully with it&#8217;s sample data today(it was a bitch until I changed the hostname to localhost.com!) .  However, I set my VM hostname as localhost.com, and I would like to access it from my OSX Safari.  And of course, my DNS records localhost.com as something else on the internet, but not pointing to my VM&#8217;s IP address.  </p>
<p>So what should I do?  I have to change the &#8220;<strong>hosts</strong>&#8221; file on my Mac.  It is located at &#8220;<strong>/private/etc/hosts</strong>&#8220;.  In order to edit it, you have to grant yourself as root privilege, but by default &#8220;root&#8221; account is disabled in OSX.  Therefore, you will use command &#8220;<strong>sudo</strong>&#8220;.  For example, I use vi for editing, I will type &#8220;<strong>sudo vi /private/etc/hosts</strong>&#8221; in my terminal windows, and it will prompt me to enter a password(which it should be your admin password on OSX).  Once you get authorized, you should be able to edit the <strong>hosts</strong> file. </p>
<p> To enter a new hostname in hosts file, in a new line at the end, type in IP address, then Tab, and the hostname.  Once saved, Mac OSX should resolve the hostname to that IP address.  </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sunnycyk.hk/?feed=rss2&amp;p=358</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
