Friday, July 11, 2008

Your own Website, your own dedicated server, at your HOME…

You just typed in the URL in the address bar of the web browser and the site opened in front of you. Have you ever thought that from where the page came from or where it is lying? So, how do you feel if something like this happens for your website? Sounds great! But for this you have to buy the web space to place your web site over there, then buy the domain name, by which the people can access your stuff worldwide.


But you yourself have a computer which has lot of space available. Also you are having an internet connection. Can you use your own computer to act as server for hosting your website? Yes, sure you can do this; after all you have spent a lot of money for your computer, so it’s the time for you to exploit it!


There are many issues that must be handled for hosting the website from your home PC, which I shall take on in this article. The most important issue is that people access your stuff using your broadband internet connection. In 90% of the cases your ISP provide you with the dynamic IP, i.e. every time you get a different IP address when you connect to the internet. So it will be difficult for the DNS to map your computer appropriately. This is the main issue, which is handled later in this article.


For getting started its assumed that you have made you own website and its now ready to be published on the internet. In Windows XP Pro/2000/NT there is windows service available called Internet Information Service (IIS) for hosting website but in Windows 98/XP Home this is not available so, I’m using the third party server for publishing the server.
Here I am using Apache Tomcat web server for the deployment of the web site.


Getting started…
First download and install Apache Tomcat on your computer. Just follow the typical settings for installation. To test whether the server is working properly fire a web browser window and type in the following: http://localhost:8080

You will see the Tomcat home page. Now it is sure that you your server is installed and working properly. Now place the folder containing your web files in the webapps folder inside Tomcat. The very first page i.e. the home page of your website must be index.html or index.jsp. If this is not the case then rename the home page file to index.html or index.jsp and also update the links in your web site for your home page.


Making your website accessible
You have to configure your system for making your website accessible for people on the internet. First of all you have to configure your firewall to allow the requests for your website. For this, if you are using any other program other than the Windows inbuilt firewall then configure it to allow connections for port 80 that is for HTTP (Web Service). If you are using Windows firewall as in Win XP then in its advances settings tick the Web Service (HTTP). Thus now your system is configured to handle HTTP request from outside.


Securing your system
As you allow people on the internet to access the content available on your system, it’s not safe regarding the security issues as there are many security loopholes present in Windows XP Pro. So, it will be better to get your windows updated with the security updates released by Microsoft. If you are having genuine copy of windows then use the automatic updates feature; else manually download the updates and install them.


Getting domain name
Domain names are nothing but the names by which the computers are referenced on the internet instead of IP address. IP addresses are used to uniquely identify the computers on the network; they are just like phone numbers. But having dynamic IP address its problem for DNS! This problem is handled with the concept of dynamic DNS. A lot of information is available on the internet regarding dynamic DNS and also there are many service providers for dynamic DNS. The concept behind dynamic DNS is that you open an account with the service provider and then create a host over there. Then you must download the dynamic DNS client and run on the system that you use for hosting websites and is having dynamic IP. Whenever the IP address of the system changes then the running client of the service provider updates your IP address in the provider’s DNS database so that your computer is correctly mapped to the proper IP address by the domain name. One such service provider is no-ip, that provides the dynamic DNS service. First you have to open the free account over there; once you are having account on no-ip, add host, select the domain name from the offered free domain names, then select port-80 redirect in the host type and enter port 8080 as Apache runs on port 8080. Now you are done.


Final step
Now go to apache webapps folder and rename the ROOT folder to some other name and rename your web application or website folder to ROOT. That’s all, now you are done. If everything that is explained above is right then startup the apache server and connect to internet; and your website is accessible from all over the world. To check fire a web browser window and type in the domain name of your web site that you have chosen and you will be presented with the home page of your very own website.


In this way without spending a single penny you can have your own website, your own dedicated server, at your very own HOME.

1 comment:

Manasdeep said...

Very educative.........the post reflects your originality and logical reasoning to stand independently on our own. Keep the useful inputs coming...Very valuable information revealed....