The localhost means:
In the computer network, localhost (meaning "local host", refers to "this computer") is to the Loop network interface (loopback) a standard host name, the corresponding IP address is 127.0.0.1, also do not understand the classmate please own Baidu, in the encyclopedia has a detailed introduction.
How the Web server works:
The web can be easily understood as a network.
The basic concept: agreement
Two computers to transmit data, you have to know what the other person sent the meaning of what. So they agreed on some forms of transport, which are called Protocols (Protocol).
Basic concept: HTTP
Http:hypertext Transfer Protocol
Chinese: Hypertext Transfer Protocol
This agreement, simple to understand, is that we usually surf the web and download files when the computer transfer data between the protocol.
Basic concepts: Server and Client
The client enters or clicks on a URL, sends an HTTP request to the server, the server transmits the webpage back to the client.
Now the more mainstream Web server mainly "Apache" mainly.
Basic Concepts: Web pages
Server sent to the client is the Web page;
The pages we see are actually written in HTML.
The above is the Web server working principle of the whole content, I hope to help.