Webhosting: Running your own server Tutorial
Alright, you've got your site, and you want it hosted. But wait: you aren't satisfied with what the free webpage providers are giving you! Fear no more!
If you have a decent web connection, you can run your own web server! Here I will explain all of the tedious steps.
Table of Contents
Step 1: Downloading Your Server
Step 2: Installation
Step 3: Configuring Routers/Firewalls (Optional)
Step 4: Congrats - Optional Things (Some Recommended)
- Getting a Whatever.com URL (Free & Paid both covered)
- Setting up PHP/MySQL
----------
Step 1: Downloading Your Server
The first thing you must do is download a server for your web page. There are many things you can download. I, personally, recommend Apache. Go to http://download.com.com/3150-2165-0.html?tag=dir for some Freeware and Shareware servers, or do a google search.
Or, if you want total control, get Apache. If you're planning on setting up PHP, I suggest getting Apache 1.3, since (I believe) PHP is supposed to be more stable with it. I'll explain installing PHP later.
----------
Step 2: Installation
So you've downloaded your server. Good for you! Next thing you have to do is install it. If you got something from a website such as download.com, then see the documentation.
As for Apache, heres how you set it up.
Installation is straightforward, except for the screen that asks for configuration.
Your e-mail is the administrators e-mail. As for the other two boxes, just plug in your IP address.
Test the installation by opening up your web browser (with the server running) and punching in your IP to test outside connections (or 127.0.0.1 to see if it at least works) - if a page comes up, you did things right. If there is an error, you may need to configure your router/firewall, or reinstall.
----------
Step 3: Configuring Routers/Firewalls (Optional) For outside connections
So you have a router or a firewall, eh? Stuck, aren't you. You test your installation, and you get an error. Don't worry, this is easy to fix.
Firewall: Open up port 80 for HTTP servers, and port 21 for FTP servers. See your documentation for more details.
Router: This is very easy, believe it or not. See your router type below.
Linksys -- forward the port(s) used by your server. See this page in the knowledge base for additional help.
D-Link -- You should view the Knowledge Base for instructions on your type of router. Go to "Open Ports/Applications -> Miscellaneous -> Web Server", or something along those lines.
Other -- Visit the web page for your router, or look around in the configurations. You should be able to figure it out easily enough.
After this not-so-difficult setup, try your test again. Put your IP (not 127.0.0.1.. that won't test outside connections) into your web browser to test. You should come up with something. Congrats. The dirty work is done.
----------
Step 4: Congrats - Optional Stuff (Some recommended)
HOORAY! If you're satisfied with people putting your IP into their browser to get to your page, then you're all set. As for the rest of us, here are some tips for maximum efficiency.
--==--
Getting a Whatever.com URL (Free & Paid both covered)
--==--
Ok, so you want something like JonDoe.com - not too hard. If you want a straight out www.something.com URL, that costs money. Look up more on that.
FREE Method - ok, if you want to get a URL free, check out www.dyndns.org - they offer tons of things. Sign up for an account, and set up either Dynamic DNS or Static DNS. Read the descriptions. Its VERY straight forward, and you can get a really nice sub-domain name. Like EdwardJohnson.kicks-ass.com, clan.game-server.cc, something.mine.nu, or whatever the hell you want. You get to choose the first part, and then they add something.com. For example, you could choose Trogdor20x36, and select kicks-ass.org for trogdor20x36.kicks-ass.org. Kool, huh?
--==--
Setting Up PHP/MySQL
--==--
-PHP-
VERY straighforward. If your server doesn't already have PHP, then go to http://www.php.net/manual/en/installation.php
for instructions on PHP installation.
For apache 1.3 [Windows] - very simple. Download the zip of PHP. Extract it to your C:, and rename the folder php to end up with c:\php\. Open up "C:\Program Files\Apache Group\Apache\conf\httpd.conf" (or wherever you installed apache to) in NotePad. Add these three lines to the very top (create a blank space to paste into):
--
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php "/php/php.exe"
--
Simple enough, isn't it?
-MySQL-
Download a Binary distribution of MySQL from http://www.mysql.com/downloads/. Then, go to this page to read up on how install MySQL. By the way, the link goes right to the part you need. Its VERY VERY short.. and only about 2 steps if you don't already have a copy of MySQL on your computer running.