Savant Web Server [image]
Savant Home               Download

 

DNS, Ports, Index Files, and You

All internet traffic, whether it's a web page, an e-mail, or a chat room, is transmitted from one computer to the next in little streams of data called packets. The different types of packets - HTTP, FTP, and Telnet are just a few examples - are usually identified by a number that corresponds to a port on a computer. Savant deals with HTTP packets, which are usually associated with port # 80.

At the core, all web servers are pretty simple beasts. Savant is no exception. Savant watches packets streaming in and out of your computer, anxiously waiting for one to arrive on port # 80 that asks for a file to be sent back. That packet is known as an HTTP request because it requests a file to be sent, using the HyperText Transfer Protocol. Once Savant receives an HTTP request, it responds to it by sending the requested file or an error message.

Just like your post office address, every computer - server or not - on the Internet has a unique address called an Internet Protocol Address, or IP address for short. This address consists of four numbers, with a period between each one. For example, the IP address 161.6.18.5 belongs to a machine used for instructional purposes at Western Kentucky University. Since nobody really wants to type in a bunch of numbers to access a web site, most IP addresses have text associated with them. In the example of this server, this text is "hera.wku.edu". This text is called the domain name, and the translation between the numbers and the text is done by a special type of server called a domain name server, or DNS. Every IP address that has text associated with it is entered into a table in the DNS. This is called a DNS entry.

Your DNS entry isn't overly important to Savant, since Savant contains code to automatically detect your IP address. As long as it has your IP address, Savant can service HTTP requests to infinity and beyond. The DNS entry is much more important to you, since you want to be able to tell people an easy to remember address for your site. If you want to find out what your DNS entry is, make sure Savant is running and simply start up your web browser and in the URL line type http://localhost. "Localhost" is a special reserved keyword that tells your web browser to reference the computer it's running on. Your web browser will replace "localhost" with the DNS entry for your computer. At this point, three things can happen. If you're lucky you'll get a relatively simple DNS entry, and life will be good. If you're unlucky, you'll either get a cryptic DNS entry (like "cre734576.sdfaeruio.dyzes.com") or your IP address. If either of the latter two happen, you have two choices. You can live with it, or you can try one of the several free Internet services that will map your horribly ugly DNS entry or IP address to something much prettier. I highly recommend Dynamic Host Services (DHS), at http://www.dhs.org.

The only other thing to keep in mind is that some Internet service providers give you a different IP address every time you connect to the Internet. Check for this by writing down your DNS entry or IP address, restarting your computer, then comparing your new DNS entry or IP address to the old one. If they match, you're safe. If they're not, that's bad. There are two ways to deal with this problem. The first is to kindly ask your Internet Service Provider (ISP) if they'll give you the same IP address every time. If they won't, DHS has experimental software (which appears to work very well) that will give you the same DNS entry every time you connect to the Internet regardless of your IP address.

The last topic in this section is the index file. It's rare for people to type in the explicit name of a file after your DNS entry. Most just type the DNS entry, occasionally followed by a subdirectory name, and leave it at that. So what's the server do? It sends back a file called the index file. Unimaginatively enough, this file is usually named "index.html". If an index file is not found in the DNS entry or subdirectory typed in by the user, a directory listing of every file in the directory is returned to the user. For security reasons, directory listing can be disallowed so a 404 - File Not Found error is returned to the user if an index file does not exist.

Generously Hosted By:
SourceForge Logo