Do it Yourself Hosting Without The Do It Yourself Headache
58
If you've never set up a web server in your life but you're looking to learn HTML, test out front page or maybe you've always purchased hosting from a hosting provider and suddenly, finances are tight and you need to host things yourself for a while... it doesn't matter. If you've never done it before the process can seem intimidating. I say seem because the thought of setting up a web server only sounds hard when you look at the big picture at once.
First off, you really only need three things to host a basic HTML website from your home computer. Most people in the United States are already equipped for home hosting and don't even know it. All you need to pull of DIY hosting is a computer, an internet connection and http server software. In this tutorial we're going to use Apache because it is stable, responsive and versatile.
If you are planning on running a production site for your business or yourself from your home computer you'll need to make sure that your internet connection speed is high enough to support your site and that your connection is an always on connection. You'll also need to know what type of IP address you have, a static IP address or a dynamic one. We'll cover that in more detail later on in this article.
Let's start where everyone new to something must start... at the beginning. I'll assume since you are reading this online that you have both a computer and an internet connection. We'll need to obtain a copy of Apache http server. There are several ways to go about that. There are two really excellent all in one packages that provide Apache http server, the PHP scripting language as well as MySQL database server all configured to your machine and working out of the box. These two packages are for Windows operating systems. The links to these packages are below.
Both packages provide very similar functionality and all three of the major systems every good host needs to make magic happen. It doesn't really matter if you're not into PHP or MySQL yet because you can configure either package to keep the shut down if you're not using them. Both packages provide you with an easily accessible control interface that quietly rests in the system tray. Optionally, you can download Apache http server by itself from www.apache.org/ but adding additional services like PHP later on will be more difficult that using the above packages as they can activate PHP/MySQL with the click of a menu option.
Once you've installed one of the above named packages find your way to your document root directory. The document root is the directory (folder) where your html/php files will be stored and executed from. In Wamp you can left click on the system tray icon which will bring up a menu. To get to the document root simply click the www directory option. XAMPP is similar in operation. Inside the document root directory you should see several files including an index.php file or an index.html file. These are the default files installed so that you can test your system to ensure proper operation.
It's a good idea at this point to test your system before you alter it in any way. To do that, open your preferred web browser and in the address bar type localhost and hit enter. This should bring up the test site that was put in place at the time of installation. If the test site comes up and your receive no errors, you're good to go. You can simply delete the test files from your document root and begin adding your own.
PHP and MySQL are enabled by default in both packages. You can deactivate them if you're not using them without effecting Apache.
Now that we have the three major and three most common pieces in place, lets move on to the real point of this tutorial. Putting your site online. This is the part where you'll need to know what type of IP address you have. If you use ADSL to connect to the internet then you most likely have a dynamic IP address, an IP address that changes on a set schedule or any time your modem has to disconnect and reconnect. If you use a cable modem, at least in my area, you probably have a static IP address, static IP addresses never change and a static IP address is preferable for DIY hosting as you don't have to worry about redirecting your website address to a new IP when the power goes out etc...
If you are unfortunate enough to be blessed with a dynamic IP address, don't be discouraged. We can work with that as well. If you are looking to create a hobby site and want a free address instead of a .com domain, I recommend DynDns as one possible solution. They'll give you a free second level domain which means that you'll have a subdomain of their domain.
mysitename.dyndns.com - You can choose from a variety of choices to replace the dyndns section of that domain.
You'll then download a small program that also runs in your system tray that automatically updates DynDns' records when your IP address changes. At most, you would only be down around 5 minutes if you IP address was to change.
If you are running a production site and you have your own .com domain then DynDns also offers a service for that but they will charge you. In this case I have to recommend DNSExit.
DNSExit works in the same fashion that DynDns does with one exception. They let you edit DNS for a .com for free. I've looked at a ton of free DNS providers and they seem like the most trustworthy of the bunch. I've used them before and I didn't have any problems. I can't promise that your experience won't differ but it's only a suggestion.
Keep in mind that Windows is not the most secure platform on which to run a web server. Especially Windows XP. You can do it but just be extra sure you run a good security software and keep it up to date. I would not recommend running a site that requires extensive security on the Windows XP platform. If you need extensive security consideration, you should probably look into one of the Windows Server editions or perhaps a Linux based operating system.
Last step: If you're running Wamp, it has an option on the system tray menu that says "Put Online" you have to click that before your site will actually broadcast onto the internet.
I hope that those that needed it found this article informative and useful.






