Boy oh boy has it been a long time since I last posted. I don’t have any excuses other than saying that I have been busy… My wife and I recently purchased a new home closer to my day job and painting/decorating has been time consuming to say the least.
Enough excuses.
If you own your own website, do you host it yourself? Does a third party host it for you? If your reading this, I think I can assume that you understand the advantages and disadvantages of the two options. I have made a few websites that run on a local networks, and I have setup the servers to handle this. I have created and maintained many external websites visible to Google and have hired many web hosting companies to serve these sites. However, I have never made an external website that is hosted from my own server.
Brownphp.com is currently being hosted with web hosting company, Dreamhost. I haven’t had a problem with them at all, but I have just had this desire to host my sites from my own home computer. I soon will be building a new server for the home, which will have more than enough horsepower to handle the sites. I also have a healthy supply of bandwidth through Comcast so I don’t believe that would be a potential bottle neck.
My only concerns are that I have no experience hosting a website from my home machine rather than a third party. Having no experience with this leaves me feeling a little unprepared in regards to what I am getting myself into.
One of my main questions is pointing Brownphp.com at my home computer. I already have my router set up to allow my home web server to be accessed remotely via punching in the home IP address. I just don’t know how to map the url to my home IP. Another potential problem is that I don’t have a static IP address. Are there any services that would help me get around this?
Why am I doing this when everything is already running fine? Because I want to learn how to do it. I am very experienced with PHP, MySQL and many other web languages/databases, but I don’t know how to host an external website from my own server. I could read every book in the world explaining how to do it, but if I don’t go down the rocky path and setup my own web server, I’ll never retain any of that information.
I was hoping that if any of you have had experience doing this, your knowledge would be greatly appreciated. Please comment with informative links, advice, warnings, etc. I would also like to continually update this post on my progress to help other programmers/tinkerers understand how to do this to eventually be a guide for others.
October 18th, 2009 on 6:45 am
What you need to do in order to map the url to the IP address is to set up a DNS (Domain Name Server). Or you can also use the domain registrar's DNS.
Here's how it works. When a computer requests a connection to a URL, it needs to resolve that URL to an IP address. It does this by asking it's configured DNS. That DNS gets it's information from other DNS servers.
The problem is the dynamic IP address. If you set up a DNS service on your server it can update automatically if the IP address changes, but if you use the registrar DNS you must enter a static IP address.
But even if you host your own DNS it takes time for an IP address to propagate through the DNS system and if your IP address changes frequently there will be many different versions of your cached IP address being traded back and forth between confused DNS servers.
Usually a new IP address can be propagated throughout the world within 24 hours.
In short, it is recommended to use a static IP address if you want to host your website on your own server.
October 20th, 2009 on 1:05 pm
Do you happen to have any good examples of hosting your own DNS? Or setting one up? I think I would be okay with the idea of the IP propagation delay.