<?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>plebeosaur.us &#187; Mac</title>
	<atom:link href="http://plebeosaur.us/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://plebeosaur.us</link>
	<description>Steve Stedman rambles on</description>
	<lastBuildDate>Tue, 22 Nov 2011 05:18:24 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Pointing to MAMP from Virtual Windows</title>
		<link>http://plebeosaur.us/pointing-to-mamp-from-virtual-windows/</link>
		<comments>http://plebeosaur.us/pointing-to-mamp-from-virtual-windows/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 15:45:16 +0000</pubDate>
		<dc:creator>Steve Stedman</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MAMP]]></category>

		<guid isPermaLink="false">http://plebeosaur.dev/?p=5</guid>
		<description><![CDATA[  
Web development on a Mac is pure joy. There are so many tools that just that make building websites simple and even fun. From the dead-simple MAMP web server setup to the deceptively powerful TextMate editor to the game-changing Firefox browser-cum-editor/tester (with the essential Web Developer, FireBug, and ySlow extensions), it&#8217;s all good [...]]]></description>
			<content:encoded><![CDATA[<div class="apps"><a href="http://mamp.info"><img title="MAMP personal web server" src="/0/icn/MAMP.png" alt="MAMP personal web server" /></a> <a href="http://macromates.com"><img title="TextMate editor" src="/0/icn/TextMate.png" alt="TextMate editor" /></a> <a href="http://getfirefox.com"><img title="Firefox browser" src="/0/icn/Firefox.png" alt="Firefox browser" /></a></div>
<p>Web development on a Mac is pure joy. There are so many tools that just that make building websites simple and even fun. From the dead-simple <a href="http://mamp.info">MAMP</a> web server setup to the deceptively powerful <a href="http://macromates.com/">TextMate</a> editor to the game-changing <a href="http://getfirefox.com">Firefox</a> browser-cum-editor/tester (with the essential <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developer</a>, <a href="https://addons.mozilla.org/en-US/firefox/">FireBug</a>, and <a href="http://developer.yahoo.com/yslow/">ySlow</a> extensions), it&#8217;s all good in Mac land.</p>
<p><span id="more-5"></span></p>
<p>And since Mac went Intel, we can develop like crazed bunnies and test our work in each nasty little flavor of Internet Explorer running in separate virtual Windows environments. Granted, it took a bit of Googling on my part to find out how to point Windows browsers to MAMP. But the two primary solutions are fairly straight forward and work <strong>in most cases</strong>:</p>
<ol>
<li>use the Mac&#8217;s <abbr title="Internet Protocol">IP</abbr> address (e.g., <kbd>192.168.2.2:8888</kbd>)</li>
<li>create and use a hostname
<ol>
<li>open the <code>C:\WINDOWS\system32\drivers\etc\hosts</code> file (in Notepad)</li>
<li>add a line to the bottom with the Mac&#8217;s IP address and desired hostname (e.g., <code>192.168.2.2 mamp</code>) and save</li>
<li>use that hostname (e.g., <kbd>http://mamp:8888</kbd>)</li>
</ol>
</li>
</ol>
<p><strong>In most cases?</strong> Yep. Everything runs fine so long as your apps don&#8217;t reference MAMP&#8217;s default webserver name, <code>localhost:8888</code>. Of course, the popular apps such as <a href="http://expressionengine.com">ExpressionEngine</a> and <a class="app web" href="http://wordpress.org">WordPress</a> do need a base URI—and <code>localhost:8888</code> is it.</p>
<p>Bugger. Windows has it&#8217;s own <code>localhost</code> quite separate from Mac&#8217;s and neither the two shall meet. Accessing MAMP&#8217;s <code>localhost</code> just isn&#8217;t going to happen with Windows&#8217; <code>localhost</code> listening in and intercepting. The only solution is to set up a hostname other than <code>localhost</code> on the Mac side and enter that same name in the Windows <code>host</code> config file.</p>
<p>The gritty, command-line way of changing MAMP&#8217;s hostname from <code>localhost</code> is to make some changes to its <code>httpd.conf</code> file and to muck with <code>dscl</code> (Apple&#8217;s NetInfo replacement). Feel free to Google the specifics, but I personally don&#8217;t want to have to fire up Terminal every time I want to change to another site. Thank goodness for VirtualHostX.</p>
<div class="apps"><a href="http://clickontyler.com/virtualhostx/"><img title="VirtualHostX" src="/0/icn/VirtualHostX.png" alt="VirtualHostX" /></a></div>
<p>My new pal, <a href="http://clickontyler.com/virtualhostx/">VirtualHostX</a>, allows me to create different virtual host names for all my projects. So rather than using the <code>localhost</code> URI, I can create meaningful URI&#8217;s such as <code>newproject.dev</code> and <code>anotherproject.dev</code> with impunity (which makes it superior to the <a href="http://headdress.twinsparc.com">Headdress</a> method of merely assigning new port numbers to <code>localhost</code>). VirtualHostX makes all the changes behind the scenes and even backs up the default settings before making those changes. Sweet!</p>
<p>We&#8217;ve almost achieved web developer inner-peace&#8230; but we need to make one more stop. Let&#8217;s remove that crufty port 8888 bizness (e.g., <code>localhost:8888</code>, <code>myproject.dev:8888</code>). By default, MAMP uses port 8888 to avoid conflicts with OS X&#8217;s built-in web server (which listens to the http default port 80). Since I have no immediate intentions of using OS X&#8217;s built-in server, I immediately changed MAMP&#8217;s default port setting to good ole port 80. From here on out, just enter <code>myproject.dev</code> in any Mac browser and go. Yay. Nirvana.</p>
<p>Now, back to the Windows side. After adding <code>myproject.dev</code> to the Windows <code>host</code> file (e.g., <code>192.168.2.2 myproject.dev</code>), fire up your Windows browser of choice, point it to <code>myproject.dev</code>, and Shazam! Everything works.</p>
]]></content:encoded>
			<wfw:commentRss>http://plebeosaur.us/pointing-to-mamp-from-virtual-windows/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
