Set up your own web server
Broadband Internet connections have enabled an avalanche of new content. The increased speed – typically 512Kb/sec, as opposed to 56Kb/sec for a modem under ideal conditions – has allowed the multimedia Internet to take off. However, the sheer bandwidth for streaming audio or downloading large files is only half the story when it comes to making the most of broadband ADSL or cable Internet connections. The other half is the fact that, unlike modems, you’re connected all the time with no per-minute fees. A broadband modem or, more usefully, broadband router is effectively a part of the wider Internet. This gives you the ability not only to download content as a user but to act as a server for others – or yourself – toaccess.
About web hosting
You’ll already be familiar with the idea of having a website hosted by a third-party hosting service; most paid ISPs offer limited free hosting. With a third-party web host, you design and produce your pages in your web-design package. Once that’s done you upload the pages, usually via FTP, to a special folder on the web host’s FTP server to which only you have access.
That folder is then exposed to the outside world by a web address, via the web server software running on the host’s physical servers. The process for local web hosting is the same, except you don’t upload the files to another server; you copy them to a local folder of a PC on your network.
Your web server software is configured to treat that folder as the root of your website. It opens a TCP/IP listen port on port 80 and accepts incoming web requests from anyone who’s entered your web address into their browser. By default, it will then serve the browser the default page – usually index.html – from the specially configured root folder.
Your index page is loaded into the remote user’s web browser and from there they can navigate your site: each link that’s clicked on results in a specific page request and the web server will attempt to find the page from the local drive and serve it to the remote browser over the network.
If the page requested exists in your pages folder hierarchy, it’s simply served up. However, if it isn’t, the web server generates a 404 Not Found error. In this feature, we’ll show you how to use the free Apache webserver.
What’s my web address?
A fundamental problem, if you’re exploiting your broadband connection forweb serving, is that of reconciling your numeric IP address with a web address. What do people type into their browser to find yoursite?
If you own your own domain name it’s possible to get the domain registrar to update the global DNS servers, which resolve physical machine IP addresses to friendly domain names such as pcpro.co.uk. These can then point to your local modem or router. The problem is that the vast majority of broadband services don’t offer a static IP address as standard (although it’s an option for most, subject to a monthly charge, usually about £10). This would be an inconvenience and potential showstopper, if it weren’t for two things. The first is that while your ISP may not guarantee you a static IP address, once you’ve switched on your Internet connection the ISP’s DHCP servers will assign an address that very rarely changes, and may never change at all. The second is that there exist a couple of free online services that can exploit this fact. The best and most well-known is DynDNS.org (dyndns.org).
How Dynamic DNS services work