<?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>Hale Interactive &#187; WAMP/MAMP</title>
	<atom:link href="http://www.haleinteractive.com/category/blog/wampmamp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.haleinteractive.com</link>
	<description>one developers brain dump on the world</description>
	<lastBuildDate>Thu, 27 May 2010 23:04:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting Up Virtual Servers in WAMP</title>
		<link>http://www.haleinteractive.com/2009/07/setting-up-virtual-servers-in-wamp/</link>
		<comments>http://www.haleinteractive.com/2009/07/setting-up-virtual-servers-in-wamp/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 21:38:36 +0000</pubDate>
		<dc:creator>Jason Hale</dc:creator>
				<category><![CDATA[WAMP/MAMP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.haleinteractive.com/?p=47</guid>
		<description><![CDATA[One tool I find indespensible in my job is virtual servers with WAMP. Virtual Servers allow you to run multiple projects at the same time on your localhost allowing you to quickly and easily change projects. Setting up Virtual Servers is easy:


Edit httpd.conf
This file is found in C:\wamp\bin\apache\Apache2.2.11\conf. Uncomment this line will include the apache [...]]]></description>
			<content:encoded><![CDATA[<p>One tool I find indespensible in my job is virtual servers with WAMP. Virtual Servers allow you to run multiple projects at the same time on your localhost allowing you to quickly and easily change projects. Setting up Virtual Servers is easy:</p>
<ol>
<li>
<h3>Edit httpd.conf</h3>
<p>This file is found in <em>C:\wamp\bin\apache\Apache2.2.11\conf</em>. Uncomment this line will include the apache virtual hosts setup file.</p>
<p><code>Include conf/extra/httpd-vhosts.conf</code></p>
<p>Search for &lt;Directory /&gt; in the httpd.conf file. The &#8220;default&#8221; settings here are really restricted so for a local dev setup you can change them to:</p>
<p><span id="more-47"></span><br />
<code>&lt;Directory /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Options FollowSymLinks<br />
&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br />
&nbsp;&nbsp;&nbsp;&nbsp;Order deny,allow<br />
&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br />
&lt;/Directory&gt;</code></p>
<p><strong>Security note:</strong> now doing this will open up your local server to be seen by everyone. This means that everyone in you office can ping your machine (good for testing). This also means if you&#8217;re a one man show or contract plugged directly into your modem (do people still do this) you&#8217;re opening your localhost via port 80 to the world.</p>
</li>
<li>
<h3>Edit httpd-vhosts.conf</h3>
<p>This file is found in <em>C:\wamp\bin\apache\Apache2.2.11\conf\extra</em>. Remove the example &lt;VirtualHost&gt; entries and add the following for each project.</p>
<p><code>&lt;VirtualHost *:80&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;DocumentRoot "C:\ProjectPath\"<br />
&nbsp;&nbsp;&nbsp;&nbsp;ServerName ProjectName<br />
&nbsp;&nbsp;&nbsp;&nbsp;ErrorLog "logs/ProjectName-error.log"<br />
&nbsp;&nbsp;&nbsp;&nbsp;CustomLog "logs/ProjectName-access.log" common<br />
&lt;/VirtualHost&gt;</code></p>
<p>In the above example DocumentRoot is the path to the root of your project, usually where the index file is. ServerName is what you&#8217;ll type in your browser to access the project. If you set this to &#8220;myProject&#8221; you&#8217;d access in the browser by visiting http://myProject. ErrorLog &#038; CustomLog are the error logs for each project, if you don&#8217;t include these lines all errors will be logged to the regular localhost error logs. I don&#8217;t use these often but keep them just in case.</p>
</li>
<li>
<h3>Edit hosts</h3>
<p>Your hosts file is found in <em>C:\WINDOWS\system32\drivers\etc</em>. For each project you added in step 2 add the following entry in to the hosts file where ProjectName is the same as the ServerName variable you set in the httpd-vhosts.conf file. This tells the browsers on your system to pass all calls from http://ProjectName to your localhost.</p>
<p><code>127.0.0.1&nbsp;&nbsp;&nbsp;&nbsp;ProjectName</code>
</li>
<li>
<h3>All Done</h3>
<p>Make sure all your files are saved, restart WAMP and test. That&#8217;s it! When ever you want to add another project just start at step 2. Once you get used to the process you&#8217;ll be setting up a new project on your local dev environment in less than a minute.</p>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.haleinteractive.com/2009/07/setting-up-virtual-servers-in-wamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
