A web server is software that serves web pages in response to requests from web browsers. A web server is sometimes called an HTTP server.
Suppose you use IIS to develop web applications. The default name of your web server is the name of your computer. You can change the server name by changing the name of your computer. If your computer has no name, the server uses the word localhost.
The server name corresponds to the servers root folder, which (on a Windows computer) is most likely C:\Inetpub\wwwroot. You can open any web page stored in the root folder by entering the following URL in a browser running on your computer:
http://your_server_name/your_file_name
For example, if the server name is mer_noire and a web page called soleil.html is stored in C:\Inetpub\wwwroot\, you can open the page by entering the following URL in a browser running on the local computer:
http://mer_noire/soleil.html
NOTE |
|
Remember to use forward slashes, not backslashes, in URLs. |
You can also open any web page stored in any subfolder of the root folder by specifying the subfolder in the URL. For example, suppose the soleil.html file is stored in a subfolder called gamelan, as follows:
C:\Inetpub\wwwroot\gamelan\soleil.html
You can open this page by entering the following URL in a browser running on your computer:
http://mer_noire/gamelan/soleil.html
When the web server is running on your computer, you can replace the server name with localhost. For example, the following URLs open the same page in a browser:
http://mer_noire/gamelan/soleil.html
http://localhost/gamelan/soleil.html
NOTE |
|
Another expression you can use instead of the server name or localhost is 127.0.0.1 (for example, http://127.0.0.1/gamelan/soleil.html). |