Nginx server block guides

Use this path when Nginx needs to send the right hostname to the right files or backend. It covers server blocks, roots, redirects, routing rules, and deployment-safe config structure.

Curated guides

Nginx server block guides

37 matched guides, newest first. Page 1 of 4.

Nginx access control diagram showing allowed and blocked IP traffic to a server

How to Allow or Block IP Addresses in Nginx

IP-based access rules are useful when an admin path, staging site, partner endpoint, or private dashboard should not be reachable by every visitor that can reach the Nginx...

Published

Nginx logo with a highlighted location priority routing diagram

Nginx Location Block Priority Explained

Nginx location block priority explains why a request such as /assets/app.css may be handled by a regex block even when a normal location /assets/ block exists. The matching...

Published

Nginx reverse proxy architecture diagram showing client devices routing through nginx server to multiple backend application servers

How to Create an Nginx Reverse Proxy

A reverse proxy becomes useful as soon as a local app needs a public domain, TLS, and one clean entry point. An Nginx reverse proxy gives private Node.js,...

Updated ( Published )

Nginx logo connected to TLS settings, HTTPS security, and certificate verification icons

How to Configure TLS Settings in Nginx

Default HTTPS snippets become hard to trust when Nginx inherits broad protocol lists from copied server blocks, Certbot includes, or hosting-panel templates. When you configure TLS settings in...

Published

Nginx logo connected to a PHP-FPM service diagram for FastCGI request handling

How to Configure Nginx PHP-FPM

Nginx does not execute PHP by itself. It serves static files directly and sends PHP requests to PHP-FPM through FastCGI. When that handoff is wrong, the symptoms are...

Published

Nginx logo with files transferring directly to a server representing sendfile zero-copy optimization

Enable the Nginx Sendfile Directive

Large static-file responses can make Nginx spend CPU time copying data it does not need to inspect. To enable sendfile in Nginx, set the sendfile directive so direct...

Updated ( Published )

Nginx logo with server rack and speedometer representing TCP Fast Open performance optimization

How to Enable TCP Fast Open in Nginx

Enable TCP Fast Open in Nginx only when the listener can safely accept request data before the TCP handshake fully completes. The workflow is to enable Linux server-side...

Updated ( Published )

Nginx logo with rate limiting gauge and traffic barrier protecting server infrastructure

Configure Nginx Rate Limiting with limit_req

A login form, search endpoint, or API route can overload a backend long before the rest of the site looks busy. Nginx rate limiting caps request frequency at...

Updated ( Published )