Home › Networking › Web Servers
Networking
Web Servers
A web server is the program that listens for HTTP requests and sends back pages, images, and data. Nginx and Apache are the common ones.
What it does
It waits on a port, accepts connections, works out which file or program should answer each request, and sends the response. It also handles TLS, caching, and compression.
Static vs dynamic
A static site is just files the server hands back as-is. A dynamic site runs a program per request to build the page, often passing the request to an application behind the server.
A reverse proxy
Servers often sit in front of an application and forward requests to it, adding TLS and caching on the way. That is a reverse proxy.
location / {
proxy_pass http://localhost:3000;
}