How to setup a Web server
May 18, 2008
I’m sure there are a lot of tutorials out there, and this just might make a nice addition to them! So, let’s take a look at why you want to turn your computer into a webserver
- You just want to do cool stuff with HTML and want to share with your friends
- You want a local portal to share stuff with your friends, like FTP space and such
- You want more power and control over your server than any web host offers you
- And many more!
Got a reason? Let’s see what you need for this experiment
- Windows 2000 or later
- IIS installed
- Ports forwarded
Before we move on, I’d like you to know that you cannot run PHP on this server, atleast not without configuring and installing PHP!
All right, let’s move to it!
Setting up Windows
For this experiment, you need Windows 2000 or later. I’d be using Windows Vista Ultimate though. Make sure Windows is installed and you can see the desktop, before you begin! :P
First of all, you need to install a web server. I’d be using Microsoft’s IIS (Internet Information Services) which comes by default with Windows (Even Windows 98 had a web server: PWS (Personal Web Server)) though you can use Apache, if you want.
Installing IIS
Insert your Vista disc, head to Control Panel > Programs and Features > Turn Windows features on or off (you’ll find in the right side bar of the Programs and Features windows). A dialog box will pop, find Internet Information Services
Check it, and anything else you want like IIS’s FTP service or ASP.NET or ASP or CGI, or other features and hit OK
Testing
Open Notepad, enter this
<% Dim testing testing = "This works!" Response.Write(testing) %>
Save the file as default.asp in C:\inetpub\wwwroot\ replacing or deleting the files that already exist there. Than, open your browser and type in http://localhost/ in the address bar and hit Enter. If you see text saying This works! than your installation has been successful, and you’re ready to move to the next step!
Taking your server public
Unless you just wanted to test your developed applications locally, without having to upload them to your web host, you have to try this out! I also use it for hosting Ascent’s World of Warcraft emulator, since I do not have a dedicated server. So, for this step you need some knowledge about your internet connection. If you have a static IP address, one that never changes (for example, 203.23.43.187) and you are comfortable with giving people your IP address instead of a more comfortable and easier to remember address, you are pretty much done by now! All you need now is, to forward your ports, and you’re good to go! However, if you want to have an address (like my home hosted site is snuke.mine.nu or snukie.mine.nu or home.alizahid.net :P), than you have take advantage of DynDNS’s free service!
Setting up DynDNS
I have been using DynDNS since last year, and never had any problems! It works great and anybody who’s trying this out, I would recommend you DynDNS! First, go to their website and register yourself an account. Next head to this page, and get yourself a hostname. Choose a name, than the domain you want from the drop down menu. Check the Wildcard box. This makes sure if someone enters asd.snukie.mine.nu, they are still able to view snukie.mine.nu instead of getting an error that says: Cannot find the server!. Now, from the three options in Service Type, go for Host with IP address. This configures the host name and points it to your IP address, which you put in the box below. Leave mail routing unchecked, unless you are setting up an email server (Not covered in this experiment!) and hit Create Host. Next, you forward ports
Forwarding required ports
This step is pretty quick and easy. Go to Control Panel > Windows Firewall > Allow a Program through Windows Firewall > Add port > name it HTTP or IIS and in the port number, enter 80. Make sure the protocol is set to TCP. You’re done!
Testing
Hopefully, you didn’t delete the default.asp we created earlier! Fire up your browser, and enter your newly selected host name in the address bar… TADA! You are just viewing your server from outside, congratulations, you have successfully created a web server with IIS and Windows!
Dynamic IP
Okay, so you have a dynamic IP address? No problem, just repeat the steps on Setting up DynDNS followed by the download of this small tool. It’s DynDNS’s Dynamic IP address updater client, which sits on your computer and updates the IP you enter into your host name’s configuration, so you do not have to update it whenever your dynamic IP changes! Life couldn’t be easier, right?
Now that you have successfully setup a web server on your Windows installation, you can have all the fun you want with it! Develop, test, share, everything!
Got questions? Want to share the address of the server you just made? You’re more than welcome to! Have fun!!
May 19, 2008 at 1:32 am
[...] admin wrote an interesting post today onHere’s a quick excerptFirst of all, you need to install a web server. I’d be using Microsoft’s IIS (Internet Information Services) which comes by default with Windows (Even Windows 98 had a web server: PWS (Personal Web Server)) though you can use Apache, … [...]
August 12, 2008 at 6:13 pm
I try on my windows xp with IIS. i try with localhost and web page is ok.
i got hostname from dyndns.
but i cannot browse the domain name i got from dyndns and it show the error “The server at aaatest.webhop.net is taking too long to respond.”
i think the cable internet i am using cannot use such service because of many users sharing the same dynamic address with many ports like NAT. (but i am not sure)
i even cannot browse with the current dynamic ip address of my connection. (such as http://211.19.23.250 is also not ok.)
pls tell me if there is solution for that.
August 12, 2008 at 9:55 pm
well, did you forward your ports correctly? that’s probably the only thing stopping you from browsing your own server!
October 24, 2008 at 1:02 am
I followed the same steps and i wanted to access the web page using my ip only. I am having a server in a persons office and in his office, I can go to any system and access my page, but when I go home and access the same page I could not access it and saying that the page is not found. I go to his office connect to their wireless internet and I could access that page. please tell me how can I fix this issue. Thanks in advance.
October 24, 2008 at 6:51 am
sounds like their firewall issue. check out portforward.com and open the ports from their router’s control panel. go to their office, and try opening http://192.168.0.1/ in their browser, that would usually pop up their control panel. forward port 80 in there, and you’re good to go!
October 24, 2008 at 11:45 pm
from their browser i open that ip(192.168.0.1) and i did not get anything. It replies that the it cant find that page.
October 24, 2008 at 11:46 pm
and thanks for your immmediate response.
October 24, 2008 at 11:49 pm
when I opened that portforward page it says that my external ip is..so and so..which is my ipaddress.
October 25, 2008 at 11:39 am
well, ask the office people for their router’s manual, and find out the address for it’s control panel. usually, it is 192.168.0.1
in the portforward.com page, you have to learn how to ‘externally forward’ port 80 so people from outside the network can browse your server
so, try looking in their manual, for the control panel address, and open/forward port 80