The primary function of a web server is to store, process and deliver Web pages to clients. The clients communicate with the server sending HTTP requests. Clients, mostly via Web Browsers, request for a specific resources and the server responds with the content of that resource or an error message. The response is usually a Web page such as HTML documents which may include images, style sheets, scripts, and the content in form of text.
When accessing a Web Server, every HTTP request that is received is responded to with a content and a HTTP status code. HTTP status codes are three-digit codes, and are grouped into five different classes. The class of a status code can be quickly identified by its first digit:
- 1xx : Informational - Request received, continuing process
- 2xx : Success - The action was successfully received, understood, and accepted
- 3xx : Redirection - Further action must be taken in order to complete the request
- 4xx : Client Error - The request contains bad syntax or cannot be fulfilled
- 5xx : Server Error - The server failed to fulfill an apparently valid request
More information about status code check the RFC 2616.
Web Servers are heavily used in the deployment of Web sites and in this scenario we can use two different implementations:
- Static Web Server: The content of the server’s response will be the hosted files “as-is”.
- Dynamic Web Server: Consist in a Web Server plus an extra software, usually an application server and a database. For example, to produce the Web pages you see in the Web browser, the application server might fill an HTML template with contents from a database. Due to that we say that the content of the server’s response is generated dynamically.
Last updated 1 year, 11 months ago. Help improve this document in the forum.