How Web Servers Work

Table of contents:

How Web Servers Work
How Web Servers Work

Video: How Web Servers Work

Video: How Web Servers Work
Video: What are web servers and how do they work (with examples httpd and nodejs) 2024, May
Anonim

When an internet user views a web page, he requests that page from the web server. If a site address is entered into the browser line, the browser makes a request from the web server about the web page, and the server sends data about it to the user's computer.

How web servers work
How web servers work

Instructions

Step 1

The word "server" is of English origin, it literally means "service device". In the field of computer science, the server is responsible for providing information to network resources.

Step 2

When a website is created on a web server, an IP address is assigned to it. IP is an abbreviation for Internet Protocol. An IP address consists of ten dotted digits (for example, 127.21.61.137). In order to make a request from a web server about a particular site, the browser on the computer must first find out the IP address of that site. If this information is not in the browser cache, then it makes a corresponding request from the DNS server over the Internet.

Step 3

The DNS server then tells the browser at which IP address the site is located. The browser then requests the site URL from the web server. The server responds by sending the requested page. If this page does not exist, the server sends an error message. The browser receives the message and displays it.

Step 4

In the professional world, in this situation, the browser is called "client" and the web server is called "server". Also, these concepts apply to computers. Those computers that act as web servers are called servers, and those that connect to the Internet to get information are called clients.

Step 5

A web server usually contains information about more than one site. Many hosting companies provide space for hundreds or even thousands of websites on a single web server. Each website is usually assigned its own unique IP address. This address is decrypted by the DNS server in order to obtain the domain name.

Step 6

Domain names exist for the reason that most Internet users find it difficult to remember ten-digit numbers, which are IP addresses. In addition, these addresses sometimes change.

Step 7

Each server computer provides access to the information stored on it using numbered ports. Each service provided by the server (email, hosting) has its own port. Clients connect to the service through an IP address and through a port.

Step 8

When a client connects to a server on a port, it is using a protocol. The protocol is text that shows how the client and server will communicate.

Step 9

Every web server conforms to the HTTP protocol. The most basic form of communication understood by an HTTP server contains just one command: Receive. Initially, the protocol was limited to the server sending the requested file to the client and shutting down. Later, the protocol was improved and the entire URL was sent to the client.

Step 10

When the user types the name of the URL in the browser line, the browser breaks the name into three parts: protocol, server name, file name. The browser receives information about the IP-address of the site through the name of the server, and with its help it connects to the server computer. The browser then connects to the web server at this IP address through the port. Following the protocol, the browser sends a "Receive" command to the server. The server sends HTML text to the web page. The browser reads the HTML tags and formats the page for the client computer screen.

Step 11

Most web servers use security measures. For example, they can restrict access to information with a password and login. More advanced servers increase the level of security by protecting the resource by encrypting information between the client and the server so that personal information (credit card number, phone number) remains inaccessible to other users. All of the above applies to the so-called static pages, that is, those that remain unchanged until the creator fixes them.

Step 12

But there are also dynamic pages. On them, any user can search for a keyword, make entries in guest books, comment. In this case, the web server processes the information and generates a new page. In most cases, CGI scripts are used - special commands that allow you to modify a web page.

Recommended: