<?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>TechCombo &#187; virtual host</title>
	<atom:link href="http://techcombo.com/tag/virtual-host/feed/" rel="self" type="application/rss+xml" />
	<link>http://techcombo.com</link>
	<description>Technology, Health and News</description>
	<lastBuildDate>Wed, 08 Sep 2010 02:19:39 +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>How to Install and Configure Apache</title>
		<link>http://techcombo.com/2009/08/15/how-to-install-and-configure-apache-123/</link>
		<comments>http://techcombo.com/2009/08/15/how-to-install-and-configure-apache-123/#comments</comments>
		<pubDate>Sat, 15 Aug 2009 10:34:06 +0000</pubDate>
		<dc:creator>Michael Ashworth</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[virtual host]]></category>
		<category><![CDATA[windows system]]></category>

		<guid isPermaLink="false">http://techcombo.com/?p=1108</guid>
		<description><![CDATA[Having recently moved to a new laptop and  just gone through this tricky process once again, I decided to write up these notes mostly for myself, and to put them online so I will be able to find them if ever I need them again (which I probably will)&#8230; so they are tailored to how [...]]]></description>
			<content:encoded><![CDATA[<p>Having recently moved to a new laptop and  just gone through this tricky process once again, I decided to write up these notes mostly for myself, and to put them online so I will be able to find them if ever I need them again (which I probably will)&#8230; so they are tailored to how I like to set up Apache!</p>
<p>For example, I like to partition my hard drive to separate the Windows System from Programs and my Files, so instead of using the default location (usually under C:\Program Files\) I will be installing Apache on drive D: and keeping the local copy of my website(s) on drive E: &#8230;</p>
<h3><strong><img class="alignright size-medium wp-image-1132" title="apache-installation-wizard" src="http://techcombo.com/wp-content/uploads/2009/08/apache-installation-wizard-300x228.png" alt="apache-installation-wizard" width="300" height="228" />INSTALLATION</strong></h3>
<p><strong>1.</strong> Download <strong>Apache 2 [ <a title="Apache 2" href="http://httpd.apache.org/" target="_blank">http://httpd.apache.org/ ]</a></strong> &amp; Run the Installer</p>
<p><strong>2.</strong> At the &#8220;Server Information&#8221; page:</p>
<p>* enter &#8220;localhost&#8221; for Network Domain and Server Name<br />
* and anything for Administrator&#8217;s Email Address<br />
* leave the default setting &#8220;for All Users, on Port 80, as a Service&#8221; as it is</p>
<p><strong>3. </strong>At Setup Type, select &#8220;Typical&#8221;</p>
<p><strong>4.</strong> At Destination Folder</p>
<p>* select where you want the Apache program to be installed, e.g. D:\Apache2.2\</p>
<h3><strong>CONFIGURATION</strong></h3>
<p><strong>1.</strong> In Control Panel -&gt; Administrative Tools -&gt; Services -&gt; &#8220;Apache2&#8243;</p>
<p>* stop the service (nb. you cannot edit the configuration file while Apache is running, so the service MUST be stopped before the next step)<br />
* and change the startup type to &#8220;Manual&#8221;</p>
<p><strong>2.</strong> Use a basic text editor (e.g. notepad) to open the file &#8220;httpd.conf&#8221; in the folder &#8220;%Apache2%\conf\&#8221; (where %Apache2% is the path you set in step 4 above i.e. D:\Apache2.2\conf\httpd.conf)</p>
<p><strong>3.</strong> Search for the text &#8220;server-side includes&#8221; and delete the hashes at the beginning of these following lines:</p>
<p><code>#AddType text/html .shtml<br />
#AddOutputFilter INCLUDES .shtml</code></p>
<p>Thus, they should read like this:</p>
<p><code>AddType text/html .shtml<br />
AddOutputFilter INCLUDES .shtml</code></p>
<p><strong>4.</strong> Search for &#8220;DocumentRoot&#8221; and edit the following line:</p>
<p><code>DocumentRoot "%Apache2%/htdocs"</code></p>
<p>to point to the path where you want to save your website(s), e.g:</p>
<p><code>DocumentRoot "E:/home"</code></p>
<p><strong>5.</strong> and just below that you will find the line:</p>
<p><code>&lt;Directory /&gt;</code></p>
<p><em><strong>Do not edit it</strong></em>, but look below that you will find the same line again. Edit:</p>
<p><code>&lt;Directory /&gt;</code></p>
<p>to read:</p>
<p><code>&lt;Directory "E:/home"&gt;</code></p>
<p><strong>6. </strong>a few lines further down you should find:</p>
<p><code>Options Indexes FollowSymLinks<br />
</code><br />
Edit it so it reads like below:<br />
<code><br />
Options Indexes FollowSymLinks Includes ExecCGI</code></p>
<p><strong>7.</strong> Search for the following line:<br />
<code><br />
#AddHandler cgi-script .cgi</code></p>
<p>and delete the hash so it reads:<br />
<code><br />
AddHandler cgi-script .cgi</code></p>
<p><strong>8.</strong> a few lines below that you will find:</p>
<p><code>#AddType text/html .shtml<br />
#AddOutputFilter INCLUDES .shtml<br />
</code><br />
delete the hashes so these lines read:</p>
<p><code>AddType text/html .shtml<br />
AddOutputFilter INCLUDES .shtml</code></p>
<p><strong>9. </strong>Scroll to the end of the file and add these lines, one group tailored for each of your local websites (note each must have a unique URL 127.0.0.xxx):<br />
<code><br />
&lt;NameVirtualHost 127.0.0.1<br />
&lt;VirtualHost 127.0.0.1&gt;<br />
DocumentRoot "E:/home/georgedillon.com"<br />
ServerName georgedillon.com<br />
ErrorLog "E:/home/georgedillon.com/logs/error.log"<br />
CustomLog "E:/home/georgedillon.com/logs/localaccess.log" common<br />
ScriptAlias /cgi-bin/ "E:/home/georgedillon.com/cgi-bin/"<br />
&lt;/VirtualHost&gt;<br />
&lt;Directory "E:/home/georgedillon.com/cgi-bin"&gt;<br />
Options +ExecCGI<br />
&lt;/Directory&gt;</code><br />
<code><br />
&lt;NameVirtualHost 127.0.0.2<br />
&lt;VirtualHost 127.0.0.2&gt;<br />
DocumentRoot "E:/home/stevenberkoff.com"<br />
ServerName stevenberkoff.com<br />
ErrorLog "E:/home/stevenberkoff.com/logs/error.log"<br />
CustomLog "E:/home/stevenberkoff.com/logs/localaccess.log" common<br />
ScriptAlias /cgi-bin/ "E:/home/stevenberkoff.com/cgi-bin/"<br />
&lt;/VirtualHost&gt;<br />
&lt;Directory "E:/home/stevenberkoff.com/cgi-bin"&gt;<br />
Options +ExecCGI<br />
&lt;/Directory&gt;</code></p>
<p><strong>IMPORTANT:</strong> The 2 log files ErrorLog and CustomLog MUST EXIST for EVERY website listed here, or Apache will crash when it starts</p>
<p><strong>10.</strong> Save the file and close the text editor</p>
<h3><strong>TESTING:</strong></h3>
<p><strong>1.</strong> Right click on the Apache Service Monitor icon in the Taskbar and click &#8216;Start&#8217;<br />
<strong>2.</strong> If you have followed the steps above correctly, in the upper (Service Status) window the icon next to Apache 2.2 will turn green and in the lower window you will see the message &#8220;The Apache2.2 service has started.&#8221;<br />
<strong>3.</strong> Open a browser and type in the address bar http://127.0.0.1/ and your website will appear<br />
<strong>4.</strong> IF Apache does not start correctly, then check that you have followed all the steps above accurately, that all paths are correct and that the log files exist for each virtual host.</p>
<p>Spot any mistakes? We are always open in improving our ways so feel free to comment below!</p>
<pre><strong></strong><strong></strong></pre>
]]></content:encoded>
			<wfw:commentRss>http://techcombo.com/2009/08/15/how-to-install-and-configure-apache-123/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
