<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<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/"
	>

<channel>
	<title>Webhosting &#38; You</title>
	<link>http://tech.doodleboy.com</link>
	<description>Webhosting do's, don'ts and How's</description>
	<pubDate>Tue, 05 Feb 2008 19:47:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>Configuring Apache 2.0.X  - Virtual Hosting</title>
		<link>http://tech.doodleboy.com/archives/21</link>
		<comments>http://tech.doodleboy.com/archives/21#comments</comments>
		<pubDate>Tue, 05 Feb 2008 19:47:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://tech.doodleboy.com/archives/21</guid>
		<description><![CDATA[What is virtual hosting? Well, as we discussed in setting up dns and how dns works, you might be wondering that  if every domain and subdomain has it&#8217;s own ip address then, wouldn&#8217;t we run out of ips? Yes. Of course! But, the cool thing about virtual hosting is that you can place multiple [...]]]></description>
			<content:encoded><![CDATA[<p>What is virtual hosting? Well, as we discussed in setting up dns and how dns works, you might be wondering that  if every domain and subdomain has it&#8217;s own ip address then, wouldn&#8217;t we run out of ips? Yes. Of course! But, the cool thing about virtual hosting is that you can place multiple domains on the same ip. The only exception to this is SSL which requires it&#8217;s own ip address for each certificate. So, how do you setup virtual hosting? First thing, make sure all your domains or subdomains point to the same ip address in your dns settings.</p>
<p>So for example if your ip was 127.0.0.1 then:   tech.mydomain.com , www.mydomain.com and blog.mydomain.com should all point 127.0.0.1 .</p>
<p>Next, let&#8217;s go to your apache configuration (<em>httpd.conf</em>) file.</p>
<p>In httpd.conf let&#8217;s go to the bottom of the file an add the following,</p>
<blockquote><p> NameVirtualHost *</p>
<p>&lt;VirtualHost *&gt;<br />
ServerAdmin webmaster@mydomain.com<br />
DocumentRoot c:/home/webpub/tech.mydomain.com/<br />
ServerName tech.mydomain.com<br />
ErrorLog c:/home/logs/tech.mydomain.com-error.log<br />
CustomLog c:/home/logs/tech.mydomain.com-access.log common<br />
&lt;/VirtualHost&gt;</p>
<p>&lt;VirtualHost *&gt;<br />
ServerAdmin webmaster@mydomain.com<br />
DocumentRoot c:/home/webpub/blog.mydomain.com/<br />
ServerName blog.mydomain.com<br />
ErrorLog c:/home/logs/blog.mydomain.com-error.log<br />
CustomLog c:/home/logs/blog.mydomain.com-access.log common<br />
&lt;/VirtualHost&gt;</p>
<p>&lt;VirtualHost *&gt;<br />
ServerAdmin webmaster@mydomain.com<br />
DocumentRoot c:/home/webpub/www.mydomain.com/<br />
ServerName mydomain.com<br />
ServerAlias *.mydomain.com<br />
ErrorLog c:/home/logs/www.mydomain.com-error.log<br />
CustomLog c:/home/logs/www.mydomain.com-access.log common<br />
&lt;/VirtualHost&gt;</p></blockquote>
<p>Let&#8217;s review over what we did.</p>
<blockquote><p> NameVirtualHost *</p></blockquote>
<p>This tells us we will run virtual hosts on all ips and ports.</p>
<blockquote><p>&lt;VirtualHost *&gt;<br />
ServerAdmin webmaster@mydomain.com<br />
DocumentRoot c:/home/webpub/tech.mydomain.com/<br />
ServerName tech.mydomain.com<br />
ErrorLog c:/home/logs/tech.mydomain.com-error.log<br />
CustomLog c:/home/logs/tech.mydomain.com-access.log common<br />
&lt;/VirtualHost&gt;</p></blockquote>
<p>This snippet tells apache to setup a virtual host that answers to the name tech.mydomain.com with the path for the documents  being <em>c:/home/webpub/tech.mydomain.com/</em>. If you look at the end of the configuration changes you will see an additional parameter for the virtual host mydomain.com.</p>
<p>The parameter ServerAlias allows you to assign domain aliases so that multiple domains or subdomainscan point to the same virtual host setup. So, for example, by placing this snippet last:</p>
<blockquote><p>&lt;VirtualHost *&gt;<br />
ServerAdmin webmaster@mydomain.com<br />
DocumentRoot c:/home/webpub/www.mydomain.com/<br />
ServerName mydomain.com<br />
ServerAlias *.mydomain.com<br />
ErrorLog c:/home/logs/www.mydomain.com-error.log<br />
CustomLog c:/home/logs/www.mydomain.com-access.log common<br />
&lt;/VirtualHost&gt;</p></blockquote>
<p>This will tell apache that after directing people to blog.mydomain.com or tech.mydomain.com, everything else should be directed to www.mydomain.com. In this case the * is a wildcard. You could also setup ServerAlias to be <em>ServerAlias *.mydomain.com *.myotherdomain.com </em>which would allow anything from either domain to use the same document root <em>c:/home/webpub/www.mydomain.com/</em> while tech and blog use a different one.</p>
<p>As you can see, this is a very powerful tool for setting up large numbers of websites, each with their own path on your system.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.doodleboy.com/archives/21/feed</wfw:commentRss>
		</item>
		<item>
		<title>Configuring Apache 2.0.X on Windows</title>
		<link>http://tech.doodleboy.com/archives/20</link>
		<comments>http://tech.doodleboy.com/archives/20#comments</comments>
		<pubDate>Thu, 31 Jan 2008 21:24:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://tech.doodleboy.com/archives/20</guid>
		<description><![CDATA[In my last article we talked about installing the Apache server on windows. Now let&#8217;s talk about configuring it and making use of it.
Now, by default, if you followed my directions before, you should have a directory on your computer called: C:/Program Files/Apache Group/Apache2/htdocs . This is where your current website (www.mydomain.com) lives. Any files [...]]]></description>
			<content:encoded><![CDATA[<p>In my last article we talked about installing the Apache server on windows. Now let&#8217;s talk about configuring it and making use of it.</p>
<p>Now, by default, if you followed my directions before, you should have a directory on your computer called: C:/Program Files/Apache Group/Apache2/htdocs . This is where your current website (www.mydomain.com) lives. Any files you place in here will appear if you go to this site.</p>
<p>A couple of key things to remember before we continue</p>
<ol>
<li>Configuration changes only take hold after you restart Apache.</li>
<li>You can test a configuration change before you restart Apache by clicking on Start-&gt;Programs-&gt;Apache HTTP Server 2.0-&gt;Configure Apache Server-&gt;Test Configuration</li>
<li>There is a link to the main configuration file in Start-&gt;Programs-&gt;Apache HTTP Server 2.0-&gt;Configure Apache Server</li>
<li>You can Stop/Start and Restart Apache easily from the Start-&gt;Programs-&gt;Apache HTTP Server 2.0-&gt;Control Apache Server</li>
</ol>
<p>Often, you will want to host multiple websites (or subdomains). I have found it easier to break them down by domains and or subdomains and that it&#8217;s easier if the web content was in a seperate folder away from Apache.</p>
<p>So the first thing I do is create a directory structure such as this:</p>
<blockquote><p>C:\home<br />
C:\home\webpub\  (this is where all sites will live)<br />
C:\home\webpub\www.mydomain.com (this is where www.mydomain.com will live)<br />
C:\home\logs\ (this is where your logs will live)</p></blockquote>
<p>By doing the above we can then easily breakout log files and web content away from the apache directory so future changes won&#8217;t require moving files in and out of C:/Program Files/Apache Group/Apache2/htdocs (the default location)</p>
<p>So, now how do we tell Apache to get your (www.mydomain.com) website from the new directory  C:\home\webpub\www.mydomain.com?It&#8217;s pretty straight forward.</p>
<p>First open the apache configuration file:  httpd.conf</p>
<p>Find the line(s) that say C:/Program Files/Apache Group/Apache2/htdocs and replace them with C:\home\webpub\www.mydomain.com . Save the file and restart apache. That was it. Now, any files placed in C:\home\webpub\www.mydomain.com will appear on your site. Easy? Yes, yes it was.</p>
<p>Next, lets change the location of the log file. In apache you have 2 main types of logs. <strong>Access </strong>logs which will log all visitors coming to the apache server and <strong>Error</strong> logs which log any type of errors such as an invalid page, coding errors etc. Typically if someone tries to go to http://www.mydomain.com/madeuppage.html and madeuppage.html doesn&#8217;t exist, well then that error will get logged to the <strong>Error</strong> log.</p>
<p>So, for ease of use, let&#8217;s stick the access and error logs into c:\home\logs\</p>
<p>Open youre httpd.conf file and find the lines that say:</p>
<blockquote><p>ErrorLog logs/error.log<br />
CustomLog logs/access.log common</p></blockquote>
<p>And change them to:</p>
<blockquote><p>ErrorLog c:/home/logs/mydomain.com-error.log<br />
CustomLog c:/home/logs/mydomain.com-access.log combined</p></blockquote>
<p>This will tell apache that the logs are now called mydomain.com-error.log and mydomain.com-access.log and now live in c:/home/logs . The word <strong>combined</strong> at the end tell apache that it should use the combined format which logs more information (such as the webbrowser of the visitor). As usual, save and restart apache.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.doodleboy.com/archives/20/feed</wfw:commentRss>
		</item>
		<item>
		<title>Installing Apache 2.0.X on Windows</title>
		<link>http://tech.doodleboy.com/archives/10</link>
		<comments>http://tech.doodleboy.com/archives/10#comments</comments>
		<pubDate>Thu, 31 Jan 2008 20:04:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://tech.doodleboy.com/archives/10</guid>
		<description><![CDATA[Here&#8217;s a quick and dirty out of the box way of getting Apache 2.0.x running on windows.

First, let&#8217;s go to http://httpd.apache.org
Next, find the version you want (in this case 2.0.63) and clickdownload
On the download screen you have two choices for Windows.  Win32 with SSL  or Win32 without SSL. Choose with OpenSSL since you [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick and dirty out of the box way of getting Apache 2.0.x running on windows.</p>
<ol>
<li>First, let&#8217;s go to <a href="http://httpd.apache.org">http://httpd.apache.org</a></li>
<li>Next, find the version you want (in this case 2.0.63) and click<strong>download</strong></li>
<li>On the download screen you have two choices for Windows.  Win32 with SSL  or Win32 without SSL. Choose with OpenSSL since you might at one time in the future want to use SSL certificates for encryption.</li>
<li>Ok, since we&#8217;re using 2.0.63 click on apache_2.0.63-win32-x86-openssl-0.9.7m.msi and download it</li>
<li>Open the file by double-clicking on it.</li>
<li><img src="http://tech.doodleboy.com/wp-content/ap-inst1.JPG" alt="ap-inst1.JPG" /><br />
Click NEXT</li>
<li><img src="http://tech.doodleboy.com/wp-content/ap-inst2.JPG" alt="ap-inst2.JPG" /><br />
Select&#8221;I accept&#8221; and click NEXT</li>
<li><img src="http://tech.doodleboy.com/wp-content/ap-inst3.JPG" alt="ap-inst3.JPG" /><br />
Click NEXT</li>
<li><img src="http://tech.doodleboy.com/wp-content/ap-inst4.JPG" alt="ap-inst4.JPG" /><br />
In the server information you will the basics for your site. You can easily change these later. When finished, click NEXT</p>
<ul>
<li>Network domain is the hostname of your site.</li>
<li>Server name is the website. Usually www.</li>
<li>Administrators email is where email should be directed if there&#8217;s a problem or question</li>
<li>You can run Apache on ANY port and ANY ip address, but the default port that all webbrowers know about is port 80. So choose this.</li>
</ul>
</li>
<li><img src="http://tech.doodleboy.com/wp-content/ap-inst5.JPG" alt="ap-inst5.JPG" /><br />
Choose typical and click NEXT</li>
<li><img src="http://tech.doodleboy.com/wp-content/ap-inst6.JPG" alt="ap-inst6.JPG" /><br />
Click NEXT</li>
<li><img src="http://tech.doodleboy.com/wp-content/ap-inst7.JPG" alt="ap-inst7.JPG" /><br />
Click INSTALL</li>
<li><img src="http://tech.doodleboy.com/wp-content/ap-inst8.JPG" alt="ap-inst8.JPG" /><br />
Click FINISH</li>
</ol>
<p>And that&#8217;s it! You&#8217;ve installed Apache! Congrats. Now, open your webbrowser and test it out by going to:  http://localhost</p>
<p><img src="http://tech.doodleboy.com/wp-content/ap-inst9.JPG" alt="ap-inst9.JPG" /></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.doodleboy.com/archives/10/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
