Today I am going to explain you how to use your computer as HTTP web server.
A web server is a software installed on a computer that allows other computers to access specific files on that computer/server. There are many reasons to create your own home servers. For example: file sharing, so you can download files from your home computer from anywhere or you can create a web site on own server etc. Simply said It works like this; You choose a directory on your computer, in that directory add folders, files like music, video etc. When you put the IP address of your computer the in web browser you can see all the files from that folder and you can download those files.
Let’s now create a server(HTTP server!) using Apache(a server client).
What We Need:
1. Broadband Internet connection always on.
2. Computer with Windows installed on it.
First create a folder in any DiskDrive on your computer named as MyServer
, or you can give any other name. Note the path of this folder, in my case it is E:\MyServer
. Copy here the files and folders that you want to be available online.
Download apache2.2.10- win32-x86-nossl.msi
and install it, set parameters, for localhost type something like myserver.com
(doesn’t really matter), also type your email address in field Administrator@ Email Address
as shown below, choose where you want to install it.
After you installed Apache , go to directory where you installed it (i.e. C:\Program Files\Apache Software Foundation\Apache2.2\conf
) , here you will find a httpd
Open that file with notepad.
After this notepad will appear with long and complicated code, don´t worry, you must change just 3 things.
First, in notepad file find #DocumentRoot “C:/Program Files/Apache Group/Apache2/htdocs”
and replace with#DocumentRoot “E:\MyServer”
Then find # <Directory “C:/Program Files/Apache Group/Apache2/htdocs”
and replace with <Directory “E:\MyServer”
is folder where you put files which will appear on your server. In this example I created that folder on local disc E .
Now find #AllowOverride None
and change to AllowOverride All
Now save file as httpd.conf
Type in web addresses http://localhost/
or your IP Address
, you should see something like this.
Every file you put in the folder , which we created in Step2 , will be shown on http://localhost/
If you want to access your own server from other computers. You must forward a port in the router you’re using. The port we need to forward is port number 80. Why? Because by default it’s the port used for HTTP. Port forwarding actually means opening a tunnel through the router so that the router wouldn't reject the connections that are trying to connect to it. How to port-forward? With every router it’s different. Here are the instructions for every one of them. You must also turn off you firewall.
Enjoy your home server!
If you have problems, post in comments.