Nginx server block guides - Page 3

Configure Nginx server blocks for hostnames, document roots, redirects, routing rules, and deployment-safe site structure.

Curated guides

Nginx server block guides

37 matched guides, best match first. Page 3 of 4.

NGINX CORS headers diagram showing allowed and blocked browser responses from an origin request

How to Configure CORS in Nginx

CORS becomes a server problem as soon as a browser app at one origin needs to read an API, font, image, or JSON response from another origin. To...

Published

Nginx logo routing HTTP/2 connections to web, mobile, video, and content clients

How to Enable HTTP/2 in Nginx

HTTP/2 in Nginx has a version split that matters before editing a live HTTPS server block. Nginx 1.25.1 introduced the standalone http2 on; directive and deprecated the older...

Published

Nginx logo connected to proxy cache and upstream response panels

How to Configure Nginx Proxy Cache

Nginx proxy cache stores selected upstream responses on disk so repeated requests can be served from Nginx instead of hitting the backend every time. It is useful for...

Published

Nginx logo with WebSocket routing diagram connecting clients to backend services

How to Configure an Nginx WebSocket Proxy

Nginx WebSocket proxying breaks when a normal Nginx reverse proxy handles regular HTTP requests but does not pass the upgrade handshake to the backend. The page may load,...

Published

Nginx logo with 504 timeout warning and upstream server routing diagram

How to Fix Nginx 504 Gateway Timeout Errors

An Nginx 504 Gateway Timeout error means Nginx waited too long for the next upstream step to complete. The upstream might be a reverse-proxied application, a PHP-FPM pool,...

Published

Nginx try_files routing diagram showing file checks and fallback paths.

Nginx try_files Directive Explained

Nginx try_files decides what happens after a request matches a server or location block. It can serve a real file, check for a directory, send the request to...

Published

Nginx logo with request log panels showing successful checks and error alerts

Nginx Access and Error Logs Guide

Nginx access logs and error logs remove guesswork when a site returns the wrong page, hides a static file, breaks a reverse proxy, or fails after a configuration...

Published