<?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>Goutamdey.com &#187; Tutorial</title>
	<atom:link href="http://goutamdey.com/blog/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://goutamdey.com</link>
	<description>Web development blog from Kolkata(Calcutta),India</description>
	<lastBuildDate>Thu, 07 Jan 2010 20:54:02 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache Virtual Hosts for Windows</title>
		<link>http://goutamdey.com/2006/03/05/apache-virtual-hosts-for-windows/</link>
		<comments>http://goutamdey.com/2006/03/05/apache-virtual-hosts-for-windows/#comments</comments>
		<pubDate>Sun, 05 Mar 2006 19:43:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Virtual Hosting]]></category>

		<guid isPermaLink="false">http://goutamdey.gdzine.net/?p=14</guid>
		<description><![CDATA[What is Virtualhost.
By using Apache Virtualhost directive an Apache Server can be used for several domains with one or many static IP addresses. And from a web developer&#8217;&#8217;s perspective it could be very helpfull for setting up multiple local domains for different projects.
The Usablity.
Every web developer wants to check his work before uploading his/her work to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is Virtualhost.<br />
</strong>By using Apache <a href="http://httpd.apache.org/docs/1.3/vhosts/">Virtualhost</a> directive an Apache Server can be used for several domains with one or many static IP addresses. And from a web developer&#8217;&#8217;s perspective it could be very helpfull for setting up multiple local domains for different projects.</p>
<p><strong>The Usablity.<br />
</strong>Every web developer wants to check his work before uploading his/her work to the live server. Whether the developer works for his/her own or for an organization it&#8217;&#8217;s a common and best practise. It is very usefull to see the beta in simulated real life test environment, like testing the static links with TLD names(abcd.com) and testing the dynamic part of the development with it also.<br />
So our requirement #1 comes up as having a facility to test our work against for say <a href="http://goutamdey.com/">goutamdey.com</a>.</p>
<p><span id="more-6"></span></p>
<p><strong>The Basics.<br />
</strong>When user requests for a document by typing the URL in the browser, domain name server translate the domain name entered to an IP address. The browser then sends the user&#8217;&#8217;s request to the IP address. As of <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2.2">HTTP 1.1</a>, the browser must also send to the web server the domain name that the user entered; it&#8217;&#8217;s no longer to be implied. This requirement makes virtual hosting possible.</p>
<p>If Apache has no <em>vhosts</em>, it will use the main server&#8217;&#8217;s <code>DocumentRoot</code> directory (normally set to <code>C:/Program Files/Apache Group/Apache/htdocs</code>). If Apache has been configured for <em><a href="http://httpd.apache.org/docs/1.3/vhosts/" target="_blank">virtualhosts</a></em>, it will compare the client&#8217;&#8217;s request to the <code>ServerName</code> of each <em>vhost</em> with the same IP address and port that the request came in for. The accompanying <em>vhost</em> directives of the first <a href="http://httpd.apache.org/docs/1.3/vhosts/">ServerName</a> that matches the client&#8217;&#8217;s request will be applied.</p>
<p>Within a <em><a href="http://httpd.apache.org/docs/1.3/vhosts/">vhost</a></em> block&#8211;between <code>&lt;VirtualHost&gt;</code> and <code>&lt;/VirtualHost&gt;</code> tags in <code>httpd.conf</code>&#8211;many directives may be given, but only two are typically required: the <code>ServerName</code> and the <code>DocumentRoot</code> directives. The <code>ServerName</code> directive provides the domain name. The <code>DocumentRoot</code> directive sets the root directory for the domain. If Apache finds a <em>vhost</em> with a <code>ServerName</code> that matches a client request, it will look in the root directory specified by the <code>DocumentRoot</code> directive for files. If it finds what was requested, it will send copies to the client. </p>
<p><strong>The httpd.conf  </strong></p>
<p>Step -1</p>
<p style="margin-right: 0px;" dir="ltr"><strong>NameVirtualHost 127.0.0.1<br />
NameVirtualHost 172.16.2.231</strong></p>
<p dir="ltr"><strong>Step - 2</strong></p>
<p style="margin-right: 0px;" dir="ltr"><strong>&lt;VirtualHost 127.0.0.1 172.16.2.231:80&gt; <br />
 ServerName goutamdey.com<br />
 ErrorLog logs/goutamdey.com-error_log<br />
 ServerAlias www*.goutamdey.com <br />
 DocumentRoot &#8220;D:/phpprojects/goutamdey/www&#8221;<br />
 &lt;Directory &#8220;D:/phpprojects/goutamdey/www&#8221;&gt; <br />
      Options Indexes FollowSymLinks +Includes +ExecCGI<br />
      Options Indexes FollowSymlinks MultiViews +Includes<br />
      AllowOverride none<br />
      Order allow,deny<br />
      Allow from all  <br />
 &lt;/Directory&gt;<br />
&lt;/VirtualHost&gt;</strong></p>
<p><strong>Step &#8211; 3</strong></p>
<p>Edit the<strong> yourwindir/system32/drivers/etc/hosts</strong> </p>
<p style="margin-right: 0px;" dir="ltr"><strong>127.0.0.1       localhost goutamdey.com</strong></p>
<p>And voila you should get the desired xxx.com in your local system and configure virtualhosts as per your needs.</p>
<p>&#8216;,</p>
]]></content:encoded>
			<wfw:commentRss>http://goutamdey.com/2006/03/05/apache-virtual-hosts-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.255 seconds -->
