This article provides in depth detail of
hosting a website on your own pc
with virtually no limit of
hosting space but with the requirement that you keep your pc
on at all times.
This article is divided into various sections So if you know about a section just skip it
1.Dynamic Domain Name System2.PHP,Mysql,Apache Installation3.Configuring Apache for Website4.Web Publishing tools5.Configuring modem/router6.How to View Your Own Website1.Dynamic Domain Name System(DDNS): What it does is simple terms is to assign a dynamic
domain name to your pc, The domain name is "Dynamic" because your Internet Service provider
provides you with a different ip address and your ip address is not static so we need a dynamic
domain name system.
This site provides free dynamic domains, after registering on this site you can register for a free dynamic domain name and then download their Client DynDns Updater which will automatically update changes in your ip address with the site(dyndns.com).
2.PHP,Mysql,Apache Installation: You can manually install each of them and the configuration part of these three can be quite tedious or you can opt for a package that does this install for you. I recommend you do the install manually but for the easy way out
download Wamp its a automated installer which comes with
php,mysql,apache and phpMyadmin and installs easily on your pc.
3.Configuring Apache for Website: After the installation of wamp server you would have to configure the apache server for allowing access and setting up domain.
Follow these steps:
1.
Open http.conf and Find line containing
Listen directive then change it to
Listen *:80 if you want to allow access to everyone or
Listen ipaddress:80 for listening for a specific ip range. Apache works as a Daemon that listens on port 80 by deafult and this Listen directive is used for listening to the specified ip-range
2.Then Goto The
ServerName directive in
httpd.conf and change it to
www.yoursite.com:803.Then find the
<Directory /> Directive this directive is used to control access to the specified directory which in this case is the root directory (/) you will have to change this to a more liberal access otherwise you will get the error message "you do not have rights to access /". So change the last line which by default will say
"deny from all" to
"allow from all" (without the quotes) or
"deny from all" followed by
"allow from ip-address-range".
For example if you want to allow access from abc.com copy and paste the following code replace abc.com with the actual site and replace the previous <
Directory /> code.
4.The Last part is to find
#online-offline tag replace the
allow from 127.0.0.1 to
"allow from all" without the quotes.
4.Web Publishing tools: There are various tools available like cms,wordpress,wordpress mu, joomla you can use either of them in my blog i will publicsh articles regarding wordpress though cause its in gnu general public licence so its free and also there has been rampant growth in wordpress sites.Watch my blog for easy ways to handle errors and using mysql for easily updating wordpress options.
5.Configuring modem/router: This is a very important part of so configure it carefully.
The Steps are as follows
a)Open your Browser and type
http://192.168.1.1/main.html or
http://192.168.1.1/index.html then enter your username and password by default are admin , admin respectively or admin ,password.
b)Open the
Advanced setup, then choose
NAT and then choose
virtual servers then choose add type
webserver as application name choose port number= 80 then assign the server ip address as your local lan ip address i.e of the form 192.168.xxx.yyy make sure that this
ip is static by this i mean that
dhcp should be
disabled.c)In your network settings in windows xp goto control panel, switch to classical view and then choose network connections,choose local area connection then choose properties then from items select tcp/ip and press properties button switch from obtain ip address automatically to use following ip address then type the following
ipaddress=192.168.1.2 subnetmask=255.255.255.0 default gateway=192.168.1.1(usually the first ip address in a range)
then assign the domain name server (dns server) addresses as provied by your isp. this is it you have set up the webserver .
6.How to View Your Own Website: The thing is to view your website now you will have to connect through a proxy site as your modem will not forward requests from inside of your pc to port 80 This is because Nat is configured for traffic from the outside interface of the router.So to view your site go to a proxy site Like
http://www.web4proxy.com/ and type your site url to view your site.
Thats it :-)
Do comment if the post was usefull.