<?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>CFchimp &#187; MAMP</title>
	<atom:link href="http://www.cfchimp.com/wordpress/category/mamp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cfchimp.com/wordpress</link>
	<description>monkey love coldfusion</description>
	<lastBuildDate>Tue, 08 Jun 2010 13:40:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Virtual hosts with MAMP on Leopard</title>
		<link>http://www.cfchimp.com/wordpress/2008/05/virtual-hosts-with-mamp-on-leopard/</link>
		<comments>http://www.cfchimp.com/wordpress/2008/05/virtual-hosts-with-mamp-on-leopard/#comments</comments>
		<pubDate>Wed, 14 May 2008 13:04:34 +0000</pubDate>
		<dc:creator>Chris Simmons</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[MAMP]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.cfchimp.com/wordpress/?p=52</guid>
		<description><![CDATA[Assumptions (Kind of major assumptions): You are running Leopard (and therefore cannot use &#8220;Netinfo Manager&#8221; to edit your hosts). You already have MAMP up and running and MAMP is using the Apache config file located here: /Applications/MAMP/conf/appache/httpd.conf Set up a directory for your dev website. I created: /Applications/MAMP/htdocs/csimmons Create a &#8220;host&#8221; for your site. In [...]]]></description>
			<content:encoded><![CDATA[<p>Assumptions (Kind of major assumptions):</p>
<ul>
<li>You are running Leopard (and therefore cannot use &#8220;Netinfo Manager&#8221; to edit your hosts).</li>
<li>You already have MAMP up and running and MAMP is using the Apache config file located here: <code>/Applications/MAMP/conf/appache/httpd.conf</code></li>
</ul>
<ol>
<li> Set up a directory for your dev website.  I created: <code>/Applications/MAMP/htdocs/csimmons</code></li>
<li>Create a &#8220;host&#8221; for your site.  In Leopard this will require you to edit the hosts file manually.  Be sure to use sudo or you will not be able to save the file.  Type the following and enter the root password when prompted:<br />
<code>$ sudo pico /etc/hosts</code><br />
Add the following at the bottom<br />
<code><br />
# VIRTUAL HOST START<br />
127.0.0.1 csimmons.dev<br />
# VIRTUAL HOST STOP<br />
</code><br />
CTRL+O to write the file (then hit ENTER)<br />
CTRL+X to exit pico</li>
<li>Flush the DNS cache<br />
<code>$ dscacheutil -flushcache</code></li>
<li>Edit the Apache config file:<br />
<code>$ pico /Applications/MAMP/conf/apache/httpd.conf</code>Change the following:<br />
OLD:<br />
<code>ServerName localhost:8888</code><br />
NEW:<br />
<code>ServerName 127.0.0.1:8888</code></p>
<p>Continue to the very bottom of the file (use CTRL+V to page down faster) and you will find &#8220;Section 3: Virtual Hosts&#8221;.  Add the following at the very end:<br />
<code><br />
NameVirtualHost 127.0.0.1<br />
&lt;virtualhost 127.0.0.1&gt;<br />
DocumentRoot /Applications/MAMP/htdocs<br />
ServerName localhost<br />
&lt;/virtualhost&gt;<br />
# DEVELOPMENT HOSTS START<br />
&lt;virtualhost 127.0.0.1&gt;<br />
DocumentRoot /Users/username/Sites/csimmons<br />
ServerName csimmons.dev<br />
&lt;/virtualhost&gt;<br />
# DEVELOPMENT HOSTS STOP<br />
</code><br />
CTRL+O to write the file (then hit ENTER)<br />
CTRL+X to exit pico</li>
<li>Restart the MAMP servers.  I just click &#8220;Stop Servers&#8221; and then &#8220;Start Servers&#8221; on the MAMP widget.</li>
<li>Try it out.  Point your browser to the following (no www in the address and don&#8217;t forget the port[8888]): http://csimmons.dev:8888</li>
<li>Rinse.  Repeat for each of your dev sites.  Multiple sites would look like this:
<p>hosts file:<br />
<code><br />
# VIRTUAL HOST START<br />
127.0.0.1 csimmons.dev<br />
127.0.0.1 site2.dev<br />
# VIRTUAL HOST STOP<br />
</code><br />
Apache config file:<br />
<code><br />
# DEVELOPMENT HOSTS START<br />
&lt;virtualhost 127.0.0.1&gt;<br />
DocumentRoot /Users/username/Sites/site2<br />
ServerName csimmons.dev<br />
&lt;/virtualhost&gt;<br />
&lt;virtualhost 127.0.0.1&gt;<br />
DocumentRoot /Users/username/Sites/site2<br />
ServerName site2.dev<br />
&lt;/virtualhost&gt;<br />
# DEVELOPMENT HOSTS STOP<br />
</code></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.cfchimp.com/wordpress/2008/05/virtual-hosts-with-mamp-on-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
