Nginx server block guides - Page 2

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 2 of 4.

Nginx logo routing dotted traffic paths to multiple backend server panels

Configure Nginx Upstream Load Balancing

Nginx upstream load balancing lets one public virtual host send traffic to two or more backend servers. It is useful when an application runs on several ports, containers,...

Published

Nginx logo with 403 gate and web file diagram for Forbidden troubleshooting

How to Fix Nginx 403 Forbidden

An Nginx 403 Forbidden error means the request reached the server, but Nginx or an upstream layer refused to serve the requested resource. The most common causes are...

Published

Nginx logo with 404 warning and file routing diagram for troubleshooting Not Found errors

How to Fix Nginx 404 Not Found

An Nginx 404 Not Found error means the request reached a web server, but the active Nginx configuration or the upstream application could not match it to a...

Published

Nginx logo with broken upstream flow and 502 alert for Bad Gateway troubleshooting

How to Fix Nginx 502 Bad Gateway

An Nginx 502 Bad Gateway error means Nginx accepted the client request but could not get a valid response from the upstream service. The upstream might be a...

Published

Nginx logo with browser windows showing www redirect arrows between domains

Nginx Redirect WWW to Non-WWW or Non-WWW to WWW

An Nginx redirect from www to non-www is usually a server-block decision, not an application rewrite. A small server block can catch www.example.com, send a permanent 301 response,...

Updated ( Published )

Nginx logo with a document showing a port change from 80 to 8080 and network gear icons representing port configuration and routing.

How to Change NGINX Ports

Changing the Nginx port starts with the listen directive inside each server block, not with a global service setting. To change Nginx port 80 to 8080, update every...

Updated ( Published )

Nginx logo with file caching and database icons representing open file cache configuration

Enable Nginx open_file_cache for Static Files

Repeated static-file requests can waste time on the same filesystem checks: open the file, confirm it still exists, read its size, and check its modification time. Nginx open_file_cache...

Updated ( Published )

NGINX security headers diagram showing Strict-Transport-Security, Content-Security-Policy, and X-Content-Type-Options flowing from NGINX hexagon to security shield with padlock

How to Configure NGINX Security Headers

Security headers tell browsers how to handle HTTPS, framing, MIME sniffing, referrer data, resource loading, and browser APIs before application code runs. Configuring NGINX security headers is usually...

Updated ( Published )

NGINX logo alongside browser windows with redirect arrows showing URL redirection

How to Redirect URLs in Nginx

Redirects are the cleanup layer for old URLs, domain moves, HTTPS enforcement, and canonical host changes. In NGINX, most URL redirects should use return because it sends the...

Updated ( Published )

Nginx logo with HTTP and HTTPS security padlocks showing upgrade-insecure-requests directive workflow

Configure upgrade-insecure-requests in NGINX

Hard-coded HTTP asset URLs are one of the last problems that surface after an HTTPS migration. WordPress posts, legacy templates, CDN snippets, and database records can still point...

Updated ( Published )

Nginx HTTP/3 over QUIC diagram showing a browser, UDP 443, TLS 1.3, and upstream server

How to Enable HTTP/3 and QUIC in Nginx

HTTP/3 in Nginx is a version and build check before it is a configuration change. To enable HTTP/3 and QUIC in Nginx, the running binary must support the...

Published