What is localhost? How does it work?
Localhost refers to the loopback address of a computer running an instance of Internet Protocol (IP). The loopback address is 127.0.0.1. Localhost servers are very useful for providing network services, such as HTTP Web servers, FTP servers, and SMTP servers, to programs running on your computer. In other words, an application program running on your computer uses localhost as its server address to provide a service only to the program that is running on its own computer.
The client program can be any Web browser or FTP client program, such as Netscape Navigator (a popular Web browser) or CuteFTP Pro (a popular FTP client program). The client program sends a request to the localhost server. The server processes the requests and returns information to the client. The client and server communicate using TCP/IP over IP. Localhost servers also provide a unique method of debugging programs because they run on your own computer and you can both view and modify their content by using any text editor. Localhost servers are also commonly used for testing Web sites before they are deployed in production.
In order for an application program running on your computer to use a network service provided by localhost, it must be configured in your computer's configuration files before it can use the service. Your computer's configuration files contain certain parameters that tell applications how to access network services provided by localhost servers over your network connection or dial-up modem connection. Most computers have HTTP Web server software installed by default so you will usually find that your Web browser is configured to use http://localhost as its server address. Your computer's configuration files are usually located in the \windows\system32 folder. For example, on Windows 2000, they are located in C:\Windows\System32\Config.
In order for an application program running on your computer to use a network service provided by localhost, it must be configured in your computer's configuration files before it can use the service. Your computer's configuration files contain certain parameters that tell applications how to access network services provided by localhost servers over your network connection or dial-up modem connection. Most computers have HTTP Web server software installed by default so you will usually find that your Web browser is configured to use http://localhost as its server address. Your computer's configuration files are usually located in the \windows\system32 folder. For example, on Windows 2000, they are located in C:\Windows\System32\Config.
What is LocalHost?
LocalHost is a special domain name used to denote a local machine (i.e., the machine on which you are typing). In other words, when you enter the name of a website into your browser and add "http://localhost" at the end of the name (for example, http://www.microsoft.com/localhost), your browser will go to that site without having to contact a remote web server (that is, without going through any Internet gateway). Essentially, LocalHost is used as a kind of staging area for displaying pages and running scripts on your own computer without having to worry about getting out onto the Internet. You can also set up your own site using LocalHost by creating a directory named \localhost on your hard disk and then adding whatever pages or scripts you want; these pages will not be visible from the outside of your computer (although they will be visible from other computers that are connected to yours).
Write a public review