Firstly, setup a HTTP / HTTPS server on your computer and test its working by just typing http://localhost in your browser. The LAMP (Linux-Apache-MySQL-PHP) or WAMP (Windows-AMP) are very famous options for the same.
In Ubuntu its a very easy procedure. Just open the Synaptic Package Manager and go to Mark packages by task and select the LAMP server. Once this is done, you should have a /var/www folder in which the index.html says It works! 🙂
Now, once the server is setup, the most important step is to let the external world in! Open up ports on your router. This is one of the trickiest steps and I was very confused. Unfortunately for my GLB-802c D-LINK Router the most famous www.portforward.com was wrong! Generally this site gives useful information though. So, use some nice software (in my case it was Transmission – Bittorent client) to check whether the port (normally 80) is open or not. uTorrent can do that too. There are other tools, but am not very sure, since even now one of the online sites says my ports are closed although am sure of them being open.
Once the port is open, your job is essentially done. Find your router’s IP (right column top) address (assigned by BSNL in case of India) . Go to an anonymous proxy site and type in this IP address into the address bar. You should have your It works! or whatever was available at the http://localhost You need to use this proxy site, else it goes to the Router Configuration page. Basically trying this IP from non-proxy i.e. from browser address bar will take you to router configuration page.
More about Dyn-DNS and setting up a simple Website later.