... Opens in a new tab
  •    EN
  • Web Server

    A web server is software that accepts requests from clients via HTTP or HTTPS and sends web content in response or forwards requests to other components of a web application for processing. The client is most commonly a web browser, but mobile applications, API clients, search engine crawlers, and other programs can also send requests to a web server.

    The term web server can refer both to server software, such as Nginx or Apache HTTP Server, and to the physical or virtual server on which this software runs.

    How a Web Server Works

    When a user opens a website, the browser establishes a connection to the server and sends an HTTP request. The web server receives the request, identifies the required resource, and generates a response.

    In simplified form, the process works as follows:

    • The user enters a website address or follows a link.
    • DNS resolves the domain name to its associated IP address.
    • The browser establishes a connection to the server.
    • If HTTPS is used, a secure TLS connection is established.
    • The client sends an HTTP request.
    • The web server processes the request itself or forwards it to an application.
    • The server returns an HTTP response.
    • The browser receives HTML, CSS, JavaScript, images, and other resources and displays the page.

    For example, opening a single product page in an online store triggers dozens of such requests — for the HTML document, stylesheets, scripts, and every individual image.

    When loading a single web page, a browser typically sends multiple requests to the server rather than just one.

    HTTP and HTTPS

    The main protocols used for communication between clients and web servers are HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure).

    HTTP defines the rules for exchanging requests and responses. For example, a client can send a request for a page, and the server can return its content along with an HTTP status code.

    HTTPS is HTTP running over a secure TLS connection. TLS encrypts transmitted data and authenticates the server using a digital certificate.

    By default, HTTP traditionally uses TCP port 80, while HTTPS uses port 443. Modern HTTP/3 uses QUIC over UDP, so web protocols are not limited to TCP.

    Static and Dynamic Content

    A web server can handle both static and dynamic content.

    Static content is stored as ready-made files. It can include:

    • HTML pages;
    • images;
    • CSS files;
    • JavaScript;
    • fonts;
    • documents and other files.

    For example, a website’s logo is delivered unchanged to every visitor, with no application involved.

    In this case, the web server can locate the requested file and send it directly to the client.

    Dynamic content is generated by an application when a request is received. For example, an online store may generate a product page using information retrieved from a database.

    In this architecture, the web server receives the request and forwards it to an application. The application executes the business logic, accesses a database if necessary, and returns the result.

    Main Functions of a Web Server

    A modern web server can perform considerably more functions than simply serving HTML files.

    Depending on the product and configuration, it may provide:

    • HTTP and HTTPS request processing;
    • static file delivery;
    • TLS encryption;
    • request redirection;
    • proxying requests to applications;
    • load balancing;
    • content caching;
    • data compression;
    • virtual host management;
    • request and error logging;
    • access restrictions for specific resources.

    For example, a web server can cache a response for a set period and serve it directly on subsequent requests without putting load on the application behind it.

    Not all of these functions are required for a web server, and some may be handled by separate infrastructure components.

    Popular Web Servers

    Several software web servers are widely used.

    Nginx is used for serving static content, reverse proxying, load balancing, and handling large numbers of simultaneous connections.

    Apache HTTP Server is a web server with a modular architecture and extensive configuration options.

    Microsoft Internet Information Services (IIS) is Microsoft’s web server integrated with the Windows Server ecosystem.

    Caddy is a web server whose features include automated HTTPS configuration.

    Web servers are also built into various software platforms and frameworks.

    Cyber Security Services

     

    Web Server vs. Application Server

    A web server and an application server perform different functions, although the distinction between them can be less clear in modern systems.

    A web server is primarily designed to process HTTP requests, serve static content, and forward requests.

    An application server executes application logic: it processes data, communicates with databases and other services, and generates dynamic results.

    For example:

    Browser → Nginx → Web Application → Database

    In this architecture, Nginx accepts an external HTTP request and forwards it to the application. The application processes the request and accesses the database if necessary, after which the response is returned to the user through the web server.

    What Is a Reverse Proxy?

    A reverse proxy accepts client requests and forwards them to one or more internal servers.

    To the user, the reverse proxy appears to be the website’s endpoint, even though the request may actually be processed on another server.

    A reverse proxy can be used for:

    • distributing requests among multiple servers;
    • hiding the internal infrastructure structure;
    • centralized HTTPS handling;
    • caching;
    • routing requests to different applications;
    • applying additional security rules.

    For example, a reverse proxy can manage all TLS certificates centrally, so the applications behind it handle only unencrypted internal traffic.

    Nginx is often used both as a web server and as a reverse proxy.

    Virtual Hosts

    A single web server can host multiple websites or domain names. Virtual hosts are used for this purpose.

    For example, example.com and example.org can be hosted on the same server and use the same IP address. The web server determines which website the request is intended for and applies the corresponding configuration.

    This mechanism makes it possible to use server resources efficiently and host multiple independent web projects on shared infrastructure.

    Web Server and DNS

    DNS and a web server perform different functions.

    DNS (Domain Name System) maps a domain name to an IP address or other required network information. It helps the client determine which host it needs to connect to.

    The web server accepts the HTTP request after the connection has been established and returns content or forwards the request to an application.

    Therefore, DNS does not store or deliver the website itself: it helps locate the address of the server where the required service is available.

    Where Web Servers Are Used

    Web servers are a fundamental component of modern web infrastructure. They are used for:

    • websites and online stores;
    • corporate portals;
    • web applications;
    • REST APIs and other HTTP interfaces;
    • cloud services;
    • SaaS platforms;
    • content management systems;
    • static file delivery;
    • microservice applications.

    For example, in a microservice application a single web server often acts as the entry point for dozens of services behind it.

    In large-scale infrastructure, web servers may also be placed behind CDNs, load balancers, Web Application Firewalls (WAFs), and other components.

    FAQ



    A web server is a program that accepts requests from a browser or another client and returns web pages, files, or the results generated by a web application.


    The term is used in both senses. Technically, a web server is server software, but in everyday usage, the term can also refer to the physical or virtual machine on which the software runs.


    A web server is a software component that processes HTTP requests. Hosting is a service that provides computing resources and infrastructure for websites and applications. A hosting environment may use one or more web servers.


    A typical website requires a component capable of accepting web requests and returning responses via HTTP or HTTPS. This function can be performed by a dedicated web server, an application’s backend, a cloud platform, or a specialized service.

    Fill out the application and wait for a call from our specialists