 
    
<?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>name Archives - Complete, Concrete, Concise</title>
	<atom:link href="https://complete-concrete-concise.com/tag/name/feed/" rel="self" type="application/rss+xml" />
	<link>https://complete-concrete-concise.com/tag/name/</link>
	<description>Practical Information Without The Bloat</description>
	<lastBuildDate>Wed, 07 Sep 2011 12:45:04 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>How to Change &#039;localhost&#039; to a Domain Name</title>
		<link>https://complete-concrete-concise.com/web-tools/how-to-change-localhost-to-a-domain-name/</link>
					<comments>https://complete-concrete-concise.com/web-tools/how-to-change-localhost-to-a-domain-name/#comments</comments>
		
		<dc:creator><![CDATA[richardsplanet]]></dc:creator>
		<pubDate>Wed, 07 Sep 2011 12:45:04 +0000</pubDate>
				<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[domain name]]></category>
		<category><![CDATA[localhost]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[XAMPP]]></category>
		<guid isPermaLink="false">http://complete-concrete-concise.com/web-tools/how-to-change-localhost-to-a-domain-name</guid>

					<description><![CDATA[<p>This tutorial is for XAMPP 1.7.3 running under Windows XP with Service Pack 3. It may be similar for other version combinations, but no guarantee is made. Assumes you have installed XAMPP. Instructions can be found here. UPDATE 17-March-2012:If you are running Windows 7 (and possibly Vista) the default security settings prevent you from running [&#8230;]</p>
<p>The post <a href="https://complete-concrete-concise.com/web-tools/how-to-change-localhost-to-a-domain-name/">How to Change &#039;localhost&#039; to a Domain Name</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="c1">
<p>This tutorial is for XAMPP 1.7.3 running under Windows XP with Service Pack 3. It may be similar for other version combinations, but no guarantee is made.</p>
<p>Assumes you have installed XAMPP. Instructions can be found <a href="//complete-concrete-concise.com/web-tools/installing-xampp-apache-server-mysql-and-php">here</a>.</p>
<div class="c4">
<p><strong>UPDATE 17-March-2012:</strong>If you are running Windows 7 (and possibly Vista) the default security settings prevent you from running applications with administrative privileges. This means that you won&#8217;t be able to save changes made to the <u>hosts</u> file.</p>
<p>For instructions on opening the <u>hosts</u> file for reading and writing please see this <a href="//complete-concrete-concise.com/blog/windows-7-how-to-give-administrator-privilege-to-a-program">article</a>.</p>
</div>
</div>
<p>Installing XAMPP allows you to develop, test, and play around with web server code on your local machine. You can configure and test out your website locally, instead of live somewhere on the web.</p>
<p>It does have the drawback that to access your website you have to type <span class="i1">localhost/my-web-site</span>, where <span class="i1">my-web-site</span> is actually the directory you installed your website in.</p>
<p>You can setup the Apache Server in XAMPP to serve up web pages as though they were actually located on <span class="i1">www.my-web-site.com</span> instead of <span class="i1">localhost</span>.</p>
<p>This is a two step process: <strong>first</strong>, you have to redirect the web site name to your computer; <strong>next</strong>, you get Apache to redirect the web site address to your installed directory.</p>
<h1>Redirecting the Web Site to Your Computer</h1>
<div class="c2">
<p>When you type a web site name into the URL field (say, www.google.com), your browser sends the name to a Domain Name Server that looks up the text name (www.google.com, for example) and returns the Internet Protocol (IP) address for it (74.125.39.104 is returned for www.google.com). Your browser then connects to IP address 74.125.39.104.</p>
<p>Before your browser queries the Domain Name Server, it first checks a file called <em>hosts</em> on your computer. If the requested web site name is found, it uses the IP address found in the file.</p>
</div>
<p><strong>1) Locate</strong> your <em><u>hosts</u></em> file. In Windows XP, this file is located in <span class="i1">C:\WINDOWS\system32\drivers\etc</span>:</p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-1.png" alt="" border="0" class="centered"/></p>
<div class="c4">
<p><strong>NOTE:</strong> Different versions of Windows may store the file in a different directory.</p>
</div>
<p><strong>2) Open</strong> the file with a plain text editor (like Notepad++). <span class="i1">Using a word processor, like Word, can mess up the file when you save it.</span></p>
<p>It is very likely that the file is empty, except for the default comment and examples (the section in the green box):</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-2-large.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-2-thumb.png" alt="" border="0" class="centered"/></a></p>
<p><strong>3) Add</strong> lines containing the domain name(s) and IP address to redirect to. See the section in the red box in the image above.</p>
<ul>
<li>
<p>Each line must begin with the address 127.0.0.1 (this is the <u><em>localhost</em></u> address)</p>
</li>
<li></li>
<li>
<p>After the IP address, type the name of the domain you wish to redirect to this address. You may only enter 1 name per line.</p>
</li>
<li></li>
<li>
<p>Addresses like <span class="i1">my-site.com</span> and <span class="i1">www.my-site.com</span> are different and each need a separate line.</p>
</li>
</ul>
<div class="c1">
<p>Your address does need to be a &#8220;valid&#8221; top level domain (i.e. .com, .net, .ca, .pl, etc). It just needs to be composed of letters (a-z), numbers (0-9), hyphens (- but not as the start or end of a name) and periods (.). In the examples above, I used .15, .16, and .17 as the top level domain (which are not valid top level domains).</p>
<p>You can redirect existing domains to your machine. If you entered the line: <span class="i1">127.0.0.1   google.com</span>, then every time you typed <span class="i1">google.com</span> into your URL field, your browser would redirect the request to your machine instead of going to Google&#8217;s web site. <span class="i1"><strong>NOTE:</strong> this redirection only happens on your computer &#8211; everyone else in the world will still go to Google&#8217;s home page.</span></p>
<p>You can also redirect (on your computer only) one website to another. For example, suppose you are boycotting Google, so you decide to redirect <span class="i1">google.com</span> to <span class="i1">bing.com</span> instead. You would do that by entering Bing&#8217;s IP address in your host file followed by the web site you want to resolve to that IP address: <span class="i1">195.57.152.178   google.com</span></p>
</div>
<p><strong>4) Save </strong> the changes.</p>
<p><strong>5) Restart</strong> your browser (if it was open when you made the change to your <u><em>hosts</em></u> file).</p>
<h1>Getting Apache to Serve Your Web Site</h1>
<div class="c1">
<p>These instructions are for XAMPP 1.7.3. Other versions or XAMPP, or different Apache Server installations may have the files in different locations, or may even have the files named differently.</p>
</div>
<p><strong>6) Locate</strong> the <u>httpd-vhosts.conf</u> file. For most XAMPP 1.7.3 installs this will be <span class="i1">C:\xampp\apache\conf\extra</span> (in my case, I installed XAMPP on my D-drive, so the folder is D:\xampp\apache\conf\extra):</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-3-large.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-3-thumb.png" alt="" border="0" class="centered"/></a></p>
<p><strong>7) Open</strong> the file using a plain text editor (like Notepad++). Using a Word processor, like Word, can mess up the file when you save:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-4-large.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-4-thumb.png" alt="" border="0" class="centered"/></a></p>
<p>The file will contain some documentation and sample virtual hosts.</p>
<p><strong>8) Add</strong>, at the bottom of the file, new virtual hosts for each domain you added in step 3) above.</p>
<p>Each host will have the following form:</p>
<pre>&lt;VirtualHost *:80&gt;
    ServerName www.joomla.16
    ServerAlias joomla.16
    DocumentRoot d:/xampp/htdocs/joomla16
&lt;/VirtualHost&gt;</pre>
<p><strong>ServerName</strong>: following this label, add the name of the domain you added in step 3)</p>
<p><strong>ServerAlias</strong>: following this label, you may add as many alternate domains (separated by spaces) as you like that are supposed to resolve to this virtual host. Remember that <span class="i1">www.my-domain.com</span> is different from <span class="i1">my-domain.com</span>, but, typically, you would want them to resolve to the same server.</p>
<p><strong>DocumentRoot</strong>: following this label, add the path where your website is located. You can use an absolute path (as in the example above), or a relative path (but relative paths can be trickier to set up, so I prefer to use an absolute path).</p>
<p><strong>9) Save</strong> the file.</p>
<p><strong>10) Restart</strong> the Apache Server to have the change take effect. Do this by clicking on the Stop button on the XAMPP control panel and then clicking on the Start button. (You could also just reboot the computer, but that is overkill).</font></p>
<p><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2011/04/xampp-change-apache-port-3.png" alt="" border="0" class="centered"/></p>
<div class="c1">
<p>You should now be able to type the domain name into your URL field and go directly to your locally hosted web site:</p>
<p><a href="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-5-large.png" target="_blank"><img decoding="async" src="//complete-concrete-concise.com/wp-content/uploads/2011/09/change-localhost-to-domain-5-thumb.png" alt="" border="0" class="centered"/></a></p>
</div>
<div class="c3">
<p>For more information on configuring virtual hosts, you can read the documentation at the Apache Foundation <a href="http://httpd.apache.org/docs/2.0/vhosts/">here</a>.</p>
<p>There is a lot more you can do with virtual hosts (such as adding an IP address).</p>
<p><p>Budget web hosting providers use virtual hosts to host multiple websites on the same server (and same IP address).</p></div>

<p>The post <a href="https://complete-concrete-concise.com/web-tools/how-to-change-localhost-to-a-domain-name/">How to Change &#039;localhost&#039; to a Domain Name</a> appeared first on <a href="https://complete-concrete-concise.com">Complete, Concrete, Concise</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://complete-concrete-concise.com/web-tools/how-to-change-localhost-to-a-domain-name/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
			</item>
	</channel>
</rss>
