<?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>Simon Whatley &#187; local</title>
	<atom:link href="http://www.simonwhatley.co.uk/tag/local/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simonwhatley.co.uk</link>
	<description>The opposite of every great idea is another great idea</description>
	<lastBuildDate>Wed, 02 Nov 2011 09:28:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Configuring Your First Local Apache Website</title>
		<link>http://www.simonwhatley.co.uk/configuring-your-first-local-apache-website</link>
		<comments>http://www.simonwhatley.co.uk/configuring-your-first-local-apache-website#comments</comments>
		<pubDate>Wed, 22 Aug 2007 09:53:42 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[httpd.conf]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=326</guid>
		<description><![CDATA[Apache is controlled by a series of configuration files but the one we will be dealing with here is httpd.conf. This file contains instructions on how Apache should run. Several companies offer GUI-based Apache front-ends, but it's easier to edit the configuration files by hand.]]></description>
			<content:encoded><![CDATA[<p>Apache is controlled by a series of configuration files but the one we will be dealing with here is httpd.conf. This file contains instructions on how Apache should run. Several companies offer GUI-based Apache front-ends, but it&#8217;s easier to edit the configuration files by hand.</p>
<p>Remember to make back-up copies of all your Apache configuration files, in case one of the changes you make while experimenting renders the Web server inoperable.</p>
<p>Also, remember that configuration changes you make don&#8217;t take effect until you restart Apache.</p>
<p>Configure the httpd.conf File:</p>
<p>The httpd.conf file can be found in the conf directory in your Apache installation.  In my case, this is the following location:</p>
<p><code>C:\Program Files\Apache Software Foundation\Apache2.2\conf</code></p>
<p>1. To include the correct default or index file, you need to find the following code and make sure that your default file name is included (see screenshot).</p>
<p><span class="code">&lt;IfModule&gt;<br />
DirectoryIndex index.htm index.html<br />
&lt;/IfModule&gt;<br />
</span></p>
<p style="text-align: center"><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2007/08/apache-directory-index.gif" alt="Apache httpd.conf DirectoryIndex Configuration" /></p>
<p>For ColdFusion and PHP you would also need to include their equivalents, i.e. <code>index.cfm</code> and <code>index.php</code>.</p>
<p>2. Set up a virtual host definition:</p>
<p><span class="code">&lt;virtualhost&gt;<br />
DocumentRoot c:\WebRoot<br />
ServerName localhost<br />
&lt;directory&gt;<br />
Order allow,deny<br />
Allow from all<br />
&lt;/directory&gt;<br />
&lt;/virtualhost&gt;<br />
</span><br />
Make sure that the directory permissions are set otherwise a directory forbidden message (such as below) will be displayed.</p>
<p style="text-align: center"><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2007/08/apache-unsuccessful-config.gif" alt="Unsuccessful Apache Configuration" /></p>
<p>3. Restart the Apache service. You should then be able to browse to your local website.</p>
<p style="text-align: center"><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2007/08/apache-successful-config.gif" alt="Successful Apache Configuration" /></p>
<p>4. If you&#8217;re doing something cunning like setting up an alias for the local site, e.g. http://whatley.local/ rather than the usual http://localhost/whatley/ then you may need to edit your hosts file e.g.:</p>
<p style="text-align: center"><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2007/08/hosts-file.gif" alt="Hosts File Configuration" /></p>
<p>In my case, the hosts file is found in the following location: <code>C:\Windows\System32\drivers\etc</code>. You can simply edit this file in notepad, much like with httpd.conf.</p>
<p>And that is all there is to  it.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/configuring-your-first-local-apache-website/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

