Skip to main content

Web Server

In Turkish
Web Sunucusu
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/web-server

In short

A web server is software, or the machine running it, that accepts HTTP requests from browsers and other clients and responds with pages, files, or data.

What is a web server?

A web server is a program that listens for HTTP requests on a network port, usually 80 for HTTP and 443 for HTTPS, and sends back responses. The term can mean the software itself or the physical or virtual machine it runs on. When you type a URL, your browser sends a request to a web server, which returns the HTML, CSS, images, or JSON the page needs.

Web servers deliver two kinds of content. Static content, such as images, stylesheets, and prebuilt HTML files, is read from disk and sent as-is, which is very fast, while dynamic content is generated for each request by application code, so the web server passes those requests to an application server or runtime and relays its response. Widely used web servers include NGINX, Apache HTTP Server, Caddy, and Microsoft IIS, and they also commonly handle HTTPS encryption, compression, logging, and redirects.

Think of a web server as the front counter of a bakery: ready-made bread (static files) is handed over immediately, while custom cake orders (dynamic requests) are passed to the kitchen and delivered when ready. Most websites run a web server in front of their application, and the same program often also acts as a reverse proxy and load balancer.

A web server is often confused with an application server. A web server focuses on handling HTTP connections and serving files efficiently, while an application server runs your business logic, such as a Node.js, Python, or Java app. The line is blurry, because many runtimes, such as Node.js, include their own HTTP server, but in production a dedicated web server or reverse proxy often sits in front of them.

Key takeaways

  • A web server receives HTTP requests and returns responses such as HTML, files, or JSON.
  • It usually listens on port 80 for HTTP and port 443 for HTTPS.
  • Static files are served directly; dynamic requests are passed to application code.
  • Common extra jobs include TLS encryption, compression, logging, and redirects.
  • An application server runs business logic; a web server handles HTTP and files.

Example

A basic NGINX site configurationnginx
server {
    listen 80;
    server_name example.com;

    # Static content: read files straight from disk
    location / {
        root /var/www/example;
        try_files $uri $uri/ /index.html;
    }

    # Dynamic content: pass to an app listening on port 3000
    location /api/ {
        proxy_pass http://127.0.0.1:3000;
    }
}

Readers ask

What is the difference between a web server and an application server?

A web server handles HTTP connections and serves static files efficiently, while an application server runs the code that builds dynamic responses, such as reading from a database. In many setups a web server sits in front and forwards dynamic requests to the application server.

Is a web server hardware or software?

Both meanings are used. Strictly, the web server is the software that handles HTTP, such as NGINX or Apache, but people also call the machine that runs it a web server.

What is the difference between a web server and a reverse proxy?

A web server answers requests itself, for example by returning files. A reverse proxy forwards requests to other servers and relays their responses, and many web servers, such as NGINX, can do both.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings