This is just a timepass for anyone who would want to try making their home PC to a server. The details are for my BSNL Dataone Router WA300XXX, But you can do it on any router provided your ISP supports, it works for BSNL (Bharath Sanchar Nigam Limited, INDIA) (Hurray!) .
So the first step is to setup apache, HTTP Server. I have covered this topic in my earlier post and doesnt want to repeat
Quick install for Linux/Debian way :
sudo apt-get install apache2
On the router..
Once having done that next step is to open a PORT in the router and forward the port to our PORT 80 on your computer. Port 80 is the default HTTP port. You can open up any port in the router, say 2345.
I did it using telnet and the way to open up a port differs from router to router.
Most modem hosts a site and runs a server internally at port 80, so you can try http://192.168.1.1
or the IP address of the router.
It will ask for a username and password.
The default username and password for the router is admin
Find out NAT
Here is my screen shot of the page
Add an entry similar to that
Name : http # Whats in a name ?
External Port : 2345 #You choose, 80 may not work
Protocol : TCP
Internal Port : 80
Server IP : 192.168.1.232 #thts me
Ok I guess thats it!
Restart your modem
Find your IP
and suppose your ip is AAA.BBB.CCC.DDD
People outside can access your site http://AAA.BBB.CCC.DDD:2345/
(as long as your ip is valid and your computer is on)
What abt something like www.yourname.com?
For that you gotta pay, Since remebering numbers is not so good when compared to memorizing a name a DNS system is used. And to get into a DNS you will need a static IP and pay to point a www.yourname.com to your static IP. There are workarounds for everything, if anyone is generous to comment on this, please help. :)
One more thing
You cant access the site from http://AAA.BBB.CCC.DDD:2345/, for that http://localhost is better.
Try it out...