A lot of people want to set up a small testing server of their own, but they don’t know how. That’s why I have written this small guide that will hopefully help you. If you want to set up your own web server look at the “Setting up Apache” section.
Setting up Apache
Note: I wont show you how to set up PHP and MySQL in this section. Refer to other guides for help on that subject.The first thing you need to do is to download all the software needed. The only thing you absolutely need is the server software itself, called “Apache”. The fastest way of doing this is to download the Apache 2.2.2 MSI Installer, but you might want to look for a newer version at the Apache website. If you need scripting on your server, let’s say a guestbook or something, you’ll probably need the PHP framework too. The latest version of PHP is PHP 5.1.4, wich comes in a handy installer. If you want the extensions, and you do, you can get them from the Zipped PHP 5.1.4. The last thing you have to download is MySQL. This is only nessecary if you downloaded PHP and want a database, which is highly recommended. You can get it from their handy MySQL MSI Installer.
Now we are going to install Apache. Run the installer, and follow the instructions. It will ask you for a few things concerning the configuration of the server.
- Network Domain
- This is the domain that will show on Apache’s error pages. You can enter anything here, for example
no-ip.org - Server Name
- This is the sub-domain that Apache will show on error pages. You can enter anything you wany here too, for example
something.no-ip.org - Administrators Email Address
- I strongly advise you to fill in
SPAM@mailinator.comhere unless you really like spam. This will be visible on Apache’s error pages. - For whom to install Apache
- Choose For all users, on Port 80, as a Service – Recommended, if you need to you can change the port later.
- Installation type
- To be safe go with typical but if you know better, then go ahead.
- Where to install
- Wherever you want. Typically something like C:/Program/Apache/ or C:/Program Files/Apache/.
The time has come to configure Apache. To do this find Apache in your start menu, and select Configure Apache Server > Edit the Apache httpd.conf Configuration File. This will bring up the configuration file. Don’t mess around with stuff you don’t understand, because if you do you’ll probably have to reinstall Apache and start all over again. Now, to find the directory containing the files on your server easier we will change the location. The default is [Apache installation dir]/Apache2.2/htdocs, but C:/htdocs is way easier to remember. Therefore, go to lines 149 and 177 and replace the long default with our new, short path. Save the file and close it. Now you have to create the C:/htdocs directory, but I’m pretty sure you know how to do that.
Note: You don’t have to change this path but it is recommended. All files you want on your web server will be in this folder, so finding it is kind of important.For the configurations to take effect you have to restart Apache. To do this find the Apache icon next to the clock. It looks like a little feather. Double-click it and press Restart in the window that opens. You also have to set up your firewall to allow connections to Apache. This will probably happen automatically, often a window pops up asking you if you want to allow connections to that program. If such a window pops up, click yes. The last thing you need to do is to open port 80 and get an address. Refer to the sections “Opening ports” and “Getting an address” for more help with this.
Opening ports
If you have a router and want to set up your own server it is likely that you have to open, or “forward” a port. To do this you need to know a few things.
- Your local IP
- You can find out what your local IP is by selecting “Run…” in the start menu, typing cmd, pessing enter and then enter the command ipconfig. Your local IP usually starts with
192.168, but your network might be differnt. - Your router IP and login info
- To configure your router you will need these things. If you changed them you probably know them, if you didn’t, look at your manufacturer’s webpage for the defaults
- The port to forward
- You get this from the instructions you are following, for instance in my Apache guide it is port 80.
Now, how to configure the router depends on your make and model, but Portforward’s Forwarding guides should help you. Just find your router and follow the instructions, replacing the local IP and the port with the ones you have. It’s as simple as that!
Getting an address
To get an address, for example telephone.no-ip.org, all you have to do is to register on No-Ip, create a new subdomain in your new free account, and enter your information. It’s important that you select the “DNS Host (A)” host type and type your external IP into the IP Address field. You can find out what your external IP is by using simple services such as WhatIsMyIP.