Beginner's Quick Guide
- 1 Before We Begin
- 2 Getting the Uniform Server
- 3 Starting the Uniform Server
- 4 Admin Panel Configuration
- 5 Private Server Configuration
- 6 MySQL Server Configuration
- 7 Running the Security Console
- 8 Accessing Your Web Server Inside Your Network (Locally)
- 9 Accessing Your Web Server From Anywhere Outside Your Network (via the Internet)
- 10 Static IP Address
- 11 Port Forwarding
- 12 External IP Address
- 13 Registering For a Free Dynamic DNS Service
- 14 Good Luck On Setting Up Your Web Server!
- 15 Reference
Before We Begin
First, I'm not a professional or something, I'm just a teen who uses the computer regularly and surfs the Web everyday, and all the time, though I'm a bit of an open source fanatic, and I do like collecting portable software.
Okay, that doesn't mean that my guide here is not reliable. Although I'm not a professional, I do have real experiences with stuff like this.
I'm going to assume that you have at least the most basic knowledge of how to use your computer (using the keyboard and mouse, running a program, etc) and your computer is connected to the internet via ADSL or a similar, faster connection.
In this guide, I'll be using the Uniform Server (version 3.5) on a Windows XP Professional with SP2 machine.
Now, let's get started.
Note: Please click an image to view larger version.
Getting the Uniform Server
First, go to www.uniformserver.com then click the /download link,
then, click on UniServer3_5.zip as shown.
A dialogue box will pop up asking you to save the file. Choose a location in your computer to store the file, then click Save. The download will then begin.
If the download doesn't begin, click on this direct link, as shown.
When the download completes, browse to the folder in which you saved the UniServer3_5.zip file just now. Right-click on UniServer3_5.zip, then extract the contents of the zip archive file into a folder. (Or do whatever you usually do when extracting an archive to extract the contents of the file).
Then, place the folder somewhere in your computer that you like. I placed it in C:\Uniform Server.
Starting the Uniform Server
Browse into that folder, double click on UniController.exe to run it. Then click Start as shown in the image.
A console window will pop up while you start the server. Now, be patient and wait till the server is completely started and kicking.
After that, your browser will run and you'll be redirected to the administration panel of your server. A dialog box pops up and notify you that the server is up and running. Notice the address of your administration panel: http://localhost/apanel/. Remember this address, or even bookmark it, so that the next time you want to access your Web server's administration panel without restarting the server, you can type this address into your Web browser and click go.
A new drive letter will appear in your My Computer, in this case it's W: (W was typed into the textbox when running UniController.exe just now). W: is a virtual partition and it contains the files and folders in the udrive folder which is in your Uniform Server folder.
Congratulations! Now you have your very own Web server up and running.
Admin Panel Configuration
Start your Uniform Server and get to the server administration page at http://localhost/apanel/. Scroll down a little on the right frame and you should see there's a Security Checklist.
The first line:
Change the username/password for the Admin Panel here.
is there because you haven't create an admin username with its password for accessing the Web server's administration panel, and you also haven't lock up the admin panel with this feature.
Now click on the link "here" on this line, and you will be brought to the Admin Panel Configuration page. Now type your own admin username and admin password in each of the textboxes.
Now, click the "Change" button.
Now you've set your own username and password for your administrative account, but you need to activate it first. Open My Computer or Windows Explorer and go to your udrive folder in your Uniform Server folder, or double-click on the W: (or whatever letter you specified) drive letter in My Computer.
Double-click home, then double-click admin. Now, double-click www.
Now open Notepad, then drag the file, .htaccess into Notepad.
You should be able to view the content of .htaccess in Notepad. Now move your cursor to the lines:
#AuthName "Uniform Server - Admin Panel 2.0"
and delete the "#" symbol on every line, so that the lines become:
AuthName "Uniform Server - Admin Panel 2.0"
When the "#" symbol (read as hash) is placed at the beginning of every line, it means these lines are comments and anything on these lines are commented out and will be ignored (if you still don't understand, never mind, you'll know what it means when you learn some computer language).
Now, save the file. Go back to your administration panel, and click refresh. You will be prompted to enter your username and password.
Type your admin username and admin password you set up just now into each of the textboxes and you should be able to access the administration panel again.
Now back at the administration panel, notice at the Security Checklist, that the first line you saw just now is gone.
Private Server Configuration
Now click on the "here" link on the line:
Change the username/password for the server here.
You'll be brought to the Private Server Configuration page. Now, set a username and password just like you did just now. To be secure, this username and its password mustn't be the same as your administrative account's which you set up previously.
If you want to set up a private Web server, then activate this feature just like what you did just now. Drag the .htaccess file in W:\www (or replace W: with whatever drive letter you use) or X:\Uniform Server\udrive\www into Notepad and do like what you did just now, uncommenting the last four lines.
Note that if you do this, your Web server will only be accessible by you (everytime anybody tries to access your Web server, they will be prompted to key in the username and its password).
If you want your Web server to be public, that is, accessible by all, then open the .htaccess file in the www folder the same way you did just now and go to these three lines at the top of the file:
Deny from all
Allow from 127.0.0.1
and comment the lines out, so that they look like this:
#Deny from all
#Allow from 127.0.0.1
then save the file.
MySQL Server Configuration
Now back to the administration panel's Security Checklist. The first line previously:
Change the username/password for the server here.
should be gone.
Now, just like what you did previously, click the "here" link again, but this time, click the one on the line:
Change the root password for mysql by editing here.
and you'll be at the MySQL Server Configuration page. Notice that this time, there is nowhere for you to type your username, but only one textbox for you to type the password.
However, bear in mind that this doesn't mean that your MySQL database account doesn't have a username. Now remember this, the default username for your first MySQL database account is usually "root", this can be changed in the MySQL configuration file.
Right now, just enter the password, remember that the username is "root", then click Change.
Running the Security Console
Now back to the administration panel, and at the Security Checklist, there should be only one line left:
Run the Security Console and see if everything is OK.
Click on the "Security Console" link. And you should see something like this:
Well, read the page, they're self-explanatory.
Now put some files in the www folder which is located in your Uniform Server folder, or in the virtual W: drive.
If everything is okay, you should be able to access your page at http://localhost or http://127.0.0.1. Remember that the first file your Web server will look for is the file named index, be it index.html or index.php or whatever file type it is with the name index.
localhost is the default hostname for the localhost IP address 127.0.0.1. This can be changed, however, by modifying the file C:\Windows\system32\hosts with a text editor like Notepad.
Yeap, this file doesn't have a file extension, the filename is just hosts. The default hostname for localhost, localhost, can be changed to anything you like, but 127.0.0.1 is always the localhost IP address which is used to access your server from within your own computer.
Whenever you type http://localhost in your Web browser's address bar while your Web server is up and running, it will go to the www folder and look for the index file. The www folder is the root folder of your Web site.
For example, if you place the file index.html in the www folder, you will be able to access it at http://localhost/index.html by typing this address in your Web browser's address bar and go. If you place the file thisfile.jpg in a folder, let's say, images, in the www folder, then you will be able to access it at http://localhost/images/thisfile.jpg.
Accessing Your Web Server Inside Your Network (Locally)
Okay, now that you have your server up and running. Whenever you place a file in the www folder of your Uniform Server folder, you can access that file via http://localhost/your.file or http://127.0.0.1/your.file.
However only you can access your Web server via this address, or if there are other computers attached to your network, users of those computers can access your Web server too. They can do this by typing your internal IP address, say 192.168.2.253 in the address bar of a Web browser, and if your server is running, they will be able to access it.
For example, you placed a file, mygirlfriend.jpg, in the www folder of your Uniform Server folder. Then, at your computer where your Web server is running, you are able to access this file via http://localhost/mygirlfriend.jpg. There is another computer, say, your girlfriend's computer, which is also attached to the same network as your computer. Then your girlfriend is able to access this file via http://192.168.2.253/mygirlfriend.jpg, where 192.168.2.253 is your computer's internal IP address, and mygirlfriend.jpg is the file you placed in the www folder, whenever your Web server is up and running.
That is how your Web server can be accessed inside your network, or, locally.
Accessing Your Web Server From Anywhere Outside Your Network (via the Internet)
Now if you want your Web server to be accessible anywhere outside your network, say from a public computer which is connected to the internet in an internet cafe, or from your friend's laptop 1000 miles away from where your computer is, then there are a few things you need to do.
Since I've assumed that you are most probably on an ADSL connection, then I'll assume that you're also probably behind a router or NAT, or an ADSL modem.
Before we go on, make sure you are using static IP address and DHCP is turned off.
Static IP Address
To use static IP address, or check whether you are on static IP address, first, open your Control Panel, double-click Network Connections, then double-click Local Area Connection, or right-click on it and choose status.
Then the Local Area Connection Status window will pop up. Click Support. If your computer's IP address is static, then the Address Type will be Manually Configured. If your computer's IP address is dynamic, then the Address Type will be Assigned by DHCP.
If your IP address is already static, leave it. Otherwise, click here and follow the steps there to configure a static IP address specific to your router and system.
When your computer's IP address is already set to static, the next thing to do is port forwarding. Click here and find the router/ADSL modem you are using, or the most similar one, for your ADSL connection, then click on it.
Now you will come to a page with a long alphabetical list of various programs and other stuff. Go to the H list. Find HTTP and click on it. Then follow the guide there.
After you're done with that, if you've done it correctly, then you already did the port forwarding part.
External IP Address
Now, get your external IP address. One of the many ways this can be done is by going to Websites like www.whatismyip.com. Now give your external IP address to a friend via an instant messenger, or anybody at a computer connected to the internet outside your local area network. Ask him/her to type this external IP address (while your server is up and running, and properly configured) in his/her Web browser and see if he/she can access your Web server.
If he/she is able to load the index file you placed in the www folder of your Uniform Server folder while your server is up and running, then everything is okay, otherwise, you either didn't set a static IP address for your computer and turn of DHCP or you didn't do the port forwarding part correctly, then go back there and re-follow the guide.
So now that everything is done, and your Web server is accessible to the people with computers connected to the internet outside your network via your external IP address, say 220.127.116.11, or by typing the Web address http://18.104.22.168 at the address bar of their Web browsers.
You are probably thinking that everytime if someone wants to access the Website hosted on your Web server, he has to know your external IP address, remember it, and if your external IP address is dynamic, that is, always changing whenever you disconnect by switching off your router/ADSL modem, then switch it on and reconnect again.
This is quite a problem, isn't it? If only your server is accessible via a domain name like www.thegreatestname.com instead of an external IP address.
However, a domain name that ends with .com, .net, or even .org needs you to be registered with it, and this usually requires you to pay a one-time registration fee and a small monthly fee.
As a beginner you probably want to set up a Web server accessible via the internet for free without spending a single cent.
Fortunately, this can be done via some online services.
Registering For a Free Dynamic DNS Service
One of those services is No-IP.com. Click here to go to No-IP.com. Click Sign-up Now!. Then, fill in your details and create a new account.
After you've created a new account, login with your new account on the site. You'll see something like this:
Click Add. Then you'll come to a page like this:
Type your hostname then choose a free No-IP domain. The Host Type will be DNS Host (A).
Say if the hostname you typed is mylife, and the No-IP free domain you chose is no-ip.org, then your server will be accessible via the address http://mylife.no-ip.org/ after you are done with everything later.
Now note that your external IP address is automatically detected.
Now that you've done with everything, ignore the other blank fields and click Create Host below.
You'll see something like this:
If you click Manage at the menu, you'll see something like this:
Now logout from your account and click DOWNLOADS. Then click on the Windows logo. Click Download 2.2.1, then click Download Now. Now download the ducsetup.exe file to your computer.
Run the file you just downloaded and install the No-IP DUC program. After you finished the installation, you will be prompted to login with your No-IP.com account you created just now. After clicking Ok, you'll be running the No-IP DUC. And there's a No-IP tray icon:
which you can double-click on to bring up this:
You can see that there's a list of hostname you have created. Since you created only one just now, only one address is listed here. Tick it.
This No-IP DUC program is a dynamic updater client which functions to automatically update your No-IP.com account with your current external IP address so that you don't have to manually login to No-IP.com and enter your current external IP address yourself.
You might want to run the No-IP DUC automatically on startup. You can do this by clicking on Options, then tick Run on startup and click Ok.
Now close the window but make sure the No-IP DUC is running in the background.
Good Luck On Setting Up Your Web Server!
If you followed this guide correctly, then by now, you should already have a working Web server. And if you have properly configured your network, got a free address for your external IP, then you should be able to access your Web server via the address, but only from outside your own network of course.
Extra Tip: Changing the localhost Hostname by Modifying the hosts File
Go to the C:\Windows\system32 folder and search for the file hosts. Drag it into Notepad.
On the last line of the file:
modify localhost to your the address you specified at No-IP.com just now. For instance, if your address is mylife.no-ip.org, then the line would be changed to:
Now save the file and close it. From now on, whenever you want to access your Web server, type the address you just typed into the hosts file. Typing http://localhost at your Web browser's address bar works no more because you have just modified it to your own address.
Note that if you do this, you need to modify the .htaccess file in W:\home\admin\www and change the lines:
Deny from all
Allow from 127.0.0.1
#Deny from all
#Allow from 127.0.0.1
thus commenting them out, and save the file. Otherwise you won't be able to access your administration panel.