AI for NGINX
Configure, debug, and harden NGINX with AI — reverse proxy, TLS, rate limiting, caching, location-block precedence, and performance tuning.
42 copy-paste prompts · 68 in-depth guides Jump to prompts Jump to guides
Prompts
- Advanced
NGINX Canary & Blue-Green Routing Prompt
Design percentage-based canary and blue-green traffic routing in NGINX using split_clients and upstream weighting — with a sticky cohort, an instant rollback path, and a way to force yourself onto the canary for testing.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX CORS & Preflight Proxy Prompt
Get correct, secure CORS handling in NGINX for a reverse-proxied API — OPTIONS preflight, Access-Control-* headers, credentials, and per-origin allow-listing — without the classic duplicate-header and wildcard-with-credentials footguns.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
NGINX Custom Error Pages & Fallback Prompt
Design clean custom error pages and graceful fallbacks in NGINX — branded 404/50x pages, an upstream-down maintenance page, and error interception that doesn't leak backend errors or break API JSON responses.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX GeoIP2 Country Access Control Prompt
Add country- or ASN-based access control and routing to NGINX with the ngx_http_geoip2 module — allow/deny by country, route regional traffic, and set headers — while correctly resolving the real client IP behind a CDN or load balancer.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Zero-Downtime Reload & Binary Upgrade Prompt
Apply NGINX config and binary changes with zero dropped connections — safe reload workflow, graceful worker draining, on-the-fly binary upgrades with USR2/QUIT, and a rollback plan when a reload goes wrong.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX JWT / OAuth2 Token Validation Prompt
Validate JWT / OAuth2 access tokens at the NGINX edge before requests reach your backend — signature, expiry, issuer, audience, and scope checks — using auth_jwt (Plus) or an auth_request bridge to an introspection service on open-source NGINX.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Security Response Headers & CSP Prompt
Add a correct, non-breaking security header baseline in NGINX — Content-Security-Policy, HSTS, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, frame controls — applied so headers survive error responses and don't get silently dropped by add_header inheritance rules.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Slowloris & Timeout Hardening Prompt
Harden NGINX against slow-client and connection-exhaustion attacks — client/header/body timeouts, connection and request-rate limits, and buffer caps — tuned so real slow mobile clients aren't collateral damage.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Stream (TCP/UDP) Load Balancing Prompt
Load-balance non-HTTP traffic through NGINX's stream module — TCP services like databases and message brokers, or UDP like DNS and syslog — with health checks, PROXY protocol, timeouts, and TLS passthrough or termination.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX auth_request Subrequest SSO Prompt
Design a correct `auth_request` gateway that offloads authentication to an external SSO/auth service — forwarding the right headers, handling 401/403 vs 5xx distinctly, and passing identity back to your app — instead of a fragile snippet that leaks unauthenticated traffic on the auth service's bad day.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX HTTP/3 (QUIC) Reverse-Proxy Setup Prompt
Generate a correct, production-ready HTTP/3 + QUIC server block for an existing NGINX reverse proxy — UDP 443 listeners, Alt-Svc advertisement, congestion/retry settings, and TLS 1.3 — without breaking your working HTTP/2 fallback.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
NGINX Static-Asset Cache-Control & Immutable Versioning Prompt
Generate a correct static-asset caching policy for NGINX — long-lived immutable caching for fingerprinted bundles, short/revalidated caching for HTML, and no accidental caching of authenticated responses — so browsers and CDNs stop re-downloading unchanged files without ever serving stale HTML.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Dynamic Upstream DNS Resolution Prompt
Make NGINX re-resolve backend DNS at runtime instead of caching it forever at startup — configure the resolver directive with variables in proxy_pass (or upstream re-resolution) — so proxying to cloud services, Kubernetes, or autoscaled targets stops sending traffic to dead IPs.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX FastCGI & PHP-FPM Tuning and Caching Prompt
Design a correct, fast NGINX-to-PHP-FPM FastCGI setup — sane socket vs TCP, right buffers and timeouts, and a safe fastcgi_cache layer — so PHP apps stop returning 502s under load and stop re-executing pages that could be served from cache.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Real Client IP Behind a Load Balancer Prompt
Recover the true client IP when NGINX sits behind an L7 load balancer or CDN — configure real_ip / X-Forwarded-For or PROXY protocol with trusted-proxy scoping — so rate limits, geo rules, and access logs stop keying on the load balancer's address.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
Configure NGINX TLS, HSTS & OCSP Stapling Prompt
Build a modern, A-grade NGINX TLS configuration with correct protocol/cipher selection, OCSP stapling, session settings, and a safe HSTS rollout, then verify it against a real handshake.
- Claude
- ChatGPT
Open prompt - Intermediate
Debug NGINX 502/504 Upstream Errors Prompt
Diagnose why NGINX returns 502 Bad Gateway or 504 Gateway Timeout from an upstream by correlating the error log, the proxy block, and upstream health into a ranked root-cause list with fixes.
- Claude
- ChatGPT
Open prompt - Advanced
Design NGINX Rate Limiting with limit_req & limit_conn Prompt
Design layered NGINX rate limiting using limit_req (request rate + burst) and limit_conn (concurrency) to absorb abuse and bursts without throttling legitimate users, with the right key and shared-memory sizing.
- Claude
- ChatGPT
Open prompt - Intermediate
Fix NGINX Location Block Precedence Prompt
Untangle why the wrong NGINX location block is matching a request by tracing prefix vs regex vs exact-match precedence, then reorder/rewrite the blocks so each URL hits the intended handler.
- Claude
- ChatGPT
Open prompt - Advanced
Performance-Tune NGINX Workers, Keepalive & gzip Prompt
Tune NGINX for throughput and latency by setting worker/connection limits, keepalive (client and upstream), buffering, sendfile, and compression correctly for the hardware and workload, with measured before/after.
- Claude
- ChatGPT
Open prompt - Intermediate
Secure NGINX Reverse-Proxy Vhost Prompt
Write a hardened NGINX reverse-proxy server block that forwards correct headers, hides upstream details, sets sane security headers, and avoids common proxy footguns like open host headers and missing real-IP handling.
- Claude
- ChatGPT
Open prompt - Beginner
Troubleshoot NGINX Config That Fails nginx -t Prompt
Diagnose and fix an NGINX configuration that fails `nginx -t` by reading the exact error/line, explaining the underlying cause, and returning a corrected, test-passing config with the change isolated.
- Claude
- ChatGPT
Open prompt - Advanced
Tune NGINX proxy_cache for Hit Ratio Prompt
Design and tune NGINX proxy_cache to raise hit ratio and offload an upstream while respecting cache-control correctness, with the right cache key, zones, stale-serving, and purge strategy.
- Claude
- ChatGPT
Open prompt - Intermediate
Write Safe NGINX Redirect & Rewrite Rules Prompt
Author correct, loop-free NGINX redirects and rewrites that preserve query strings, use the right status code, avoid open redirects, and prefer return over rewrite where possible, with test cases.
- Claude
- ChatGPT
Open prompt - Advanced
NGINX gRPC & HTTP/2 Proxying Prompt
Generate a correct grpc_pass server block that terminates TLS, speaks HTTP/2 to your gRPC backend, and handles trailers and timeouts — instead of a plain proxy_pass that silently mangles streaming RPCs.
- Claude
- ChatGPT
- Cursor
Open prompt - Beginner
NGINX gzip & Brotli Compression Prompt
Configure response compression correctly — the right MIME types, a sane compression level, no double-compressing already-compressed assets, and the Vary header — so you cut bandwidth without burning CPU or corrupting binary downloads.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
NGINX Large Uploads & Request Buffering Prompt
Fix '413 Request Entity Too Large' and slow/timing-out uploads by tuning client_max_body_size, buffer sizes, and request buffering — so big file uploads stream to your backend instead of dying or eating disk.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
NGINX Log Format Design & Analysis Prompt
Design a structured (JSON or key-value) access log format that captures upstream timing, request IDs, and cache status — then get a set of awk/jq one-liners to actually answer questions from it during an incident.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
NGINX map & geo Conditional Routing Prompt
Replace a brittle pile of nested if blocks with clean map and geo directives — for feature flags, country routing, or per-host variables — so your config is fast, readable, and free of the 'if is evil' traps.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX mTLS Client Certificate Auth Prompt
Configure mutual TLS so NGINX requires and verifies client certificates — for service-to-service or partner APIs — with correct CA trust, verification depth, and the right variables passed to your backend.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX njs Scripting Prompt
Write a small, reviewable njs (NGINX JavaScript) module for request/response manipulation — header rewriting, JWT inspection, custom routing — instead of contorting the config language or reaching for Lua you don't need.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Upstream Health Checks & Load Balancing Prompt
Design an upstream block with the right load-balancing algorithm, passive health checks, and failover tuning — so a single sick backend stops poisoning your error rate instead of getting quietly removed from rotation.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
NGINX WebSocket Upgrade Proxying Prompt
Generate a WebSocket-safe proxy block — correct Upgrade/Connection map, long read timeouts, and disabled proxy buffering — so real-time connections stop dropping at 60 seconds or downgrading to plain HTTP.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
NGINX 502/504 Bad Gateway Triage Prompt
Turn a wall of error.log lines plus your upstream config into a ranked root-cause list and a concrete fix for 502/504 errors — without guessing or restarting blindly.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
Apache .htaccess to NGINX Translation Prompt
Translate an Apache vhost or .htaccess (RewriteRules, auth, headers, directory rules) into a correct NGINX server block — preserving behavior and flagging the rules that have no clean NGINX equivalent.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Config Security Audit Prompt
Audit an NGINX config for the classic misconfigurations — version leakage, missing security headers, open proxy, path traversal, exposed dotfiles — and get a prioritized fix list with exact directives, not a generic checklist.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX location & Regex Precedence Prompt
Figure out exactly which location block NGINX picks for a given request and fix the ordering bug that's routing your URL to the wrong handler — with the matching rules made explicit, not folklore.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Performance Tuning Prompt
Tune worker_processes, keepalive, buffers, sendfile, and connection limits to your actual hardware and traffic — producing a justified config diff, not cargo-culted values copied from a blog.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Proxy Cache & Microcaching Prompt
Stand up proxy_cache (or 1-second microcaching) in front of a dynamic backend to absorb traffic spikes — with a correct cache key, bypass rules, and stale-while-revalidate — without serving stale or per-user content to the wrong people.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX Rate & Connection Limiting Prompt
Design limit_req and limit_conn zones that throttle abusive traffic and protect your backend — with burst, nodelay, and per-route tuning — without rate-limiting your own legitimate users into 503s.
- Claude
- ChatGPT
- Cursor
Open prompt - Intermediate
NGINX Reverse-Proxy vhost Design Prompt
Generate a clean, production-ready reverse-proxy server block for your backend app — correct headers, timeouts, keepalive, and WebSocket support — instead of copy-pasting a Stack Overflow snippet that leaks the client IP.
- Claude
- ChatGPT
- Cursor
Open prompt - Advanced
NGINX TLS/SSL Hardening Prompt
Harden your NGINX TLS config to a modern, A-grade baseline — protocols, cipher suites, HSTS, OCSP stapling, session settings — without breaking older clients you actually need to support.
- Claude
- ChatGPT
- Cursor
Open prompt
Guides
- · 9 min read
NGINX Error Guide: '503 Service Temporarily Unavailable' — Find the Real Cause
Fix NGINX '503 Service Temporarily Unavailable': tell apart rate-limit rejections, all-upstreams-down, and backend 503s, and restore service right.
Read guide - · 9 min read
NGINX Error Guide: '[emerg] directive is not allowed here' and duplicate location
Fix NGINX [emerg] directive is not allowed here and duplicate location errors: diagnose wrong-context directives, missing braces, stray http blocks, and clashing locations.
Read guide - · 9 min read
NGINX Error Guide: '(99: Cannot assign requested address)' — Fix Port Exhaustion
Fix 'connect() failed (99: Cannot assign requested address)' in NGINX: cure ephemeral port exhaustion with keepalive pools and a wider port range.
Read guide - · 8 min read
Nginx Error: '499 Client Closed Request' — Cause, Fix, and Troubleshooting Guide
Understand nginx status 499 'Client Closed Request': the client hung up before nginx replied, usually because a slow upstream made it time out and give up.
Read guide - · 8 min read
Nginx Error: 'socket() [::]:80 failed (97: Address family not supported by protocol)' — Cause, Fix, and Troubleshooting Guide
Fix nginx 'socket() [::]:80 failed (97: Address family not supported by protocol)': IPv6 disabled or missing when using listen [::]:80.
Read guide - · 8 min read
Nginx Error: 'cannot load certificate ... BIO_new_file() failed (fopen: No such file or directory)' — Cause, Fix, and Troubleshooting Guide
Fix nginx 'cannot load certificate BIO_new_file() failed ... No such file or directory' — wrong ssl_certificate path, permissions, or an undeployed cert.
Read guide - · 8 min read
Nginx Error: 'client intended to send too large body' — Cause, Fix, and Troubleshooting Guide
Fix the nginx error log 'client intended to send too large body': raise client_max_body_size in the right context and match backend upload limits.
Read guide - · 8 min read
Nginx Error: 'could not open error log file: open() '/var/log/nginx/error.log' failed (13: Permission denied)' — Cause, Fix, and Troubleshooting Guide
Fix could not open error log file: open() failed (13: Permission denied): create /var/log/nginx, fix its owner and SELinux, and check logrotate.
Read guide - · 8 min read
Nginx Error: 'directory index of '/var/www/html/app/' is forbidden' — Cause, Fix, and Troubleshooting Guide
Fix directory index of /var/www/html/app/ is forbidden (403): add an index file, set the index directive, use try_files, or enable autoindex.
Read guide - · 8 min read
Nginx Error: 'a duplicate default server for 0.0.0.0:80' — Cause, Fix, and Troubleshooting Guide
Fix nginx [emerg] a duplicate default server for 0.0.0.0:80: only one default_server is allowed per listen socket. Diagnose the clash and resolve it.
Read guide - · 8 min read
Nginx Error: 'getpwnam('nginx') failed' — Cause, Fix, and Troubleshooting Guide
Fix nginx [emerg] getpwnam('nginx') failed: the user directive names an OS account that does not exist. Create the user or point to the correct one.
Read guide - · 8 min read
Nginx Error: 'mkdir() '/var/cache/nginx/proxy_temp' failed (13: Permission denied)' — Cause, Fix, and Troubleshooting Guide
Fix mkdir() /var/cache/nginx/proxy_temp failed (13: Permission denied): chown the cache and temp dirs to the nginx worker user so it can create them.
Read guide - · 8 min read
Nginx Error: 'no port in upstream' — Cause, Fix, and Troubleshooting Guide
Fix nginx [emerg] no port in upstream 'backend': an upstream server entry has no port and no default applies. Add the explicit :PORT and reload.
Read guide - · 9 min read
Nginx Error: 'open() '/var/www/html/index.html' failed (13: Permission denied)' — Cause, Fix, and Troubleshooting Guide
Fix open() failed (13: Permission denied) on static files: give the nginx worker read plus traverse (x) permissions and the correct SELinux context.
Read guide - · 8 min read
Nginx Error: 'peer closed connection in SSL handshake while SSL handshaking' — Cause, Fix, and Troubleshooting Guide
Understand nginx 'peer closed connection in SSL handshake while SSL handshaking' — usually benign probes, HTTP-to-HTTPS, LB health checks. When it is real.
Read guide - · 8 min read
Nginx Error: 'PEM routines:get_name:no start line ... Expecting: ANY PRIVATE KEY' — Cause, Fix, and Troubleshooting Guide
Fix nginx 'PEM routines:get_name:no start line ... Expecting: ANY PRIVATE KEY' — malformed/empty PEM, DER file, truncated key, or cert where a key belongs.
Read guide - · 8 min read
Nginx Error: 'root directive is duplicate' — Cause, Fix, and Troubleshooting Guide
Fix nginx [emerg] 'root' directive is duplicate: two root directives in the same context. Keep one root per block and use location overrides correctly.
Read guide - · 8 min read
Nginx Error: 'shared memory zone 'one' conflicts with already declared size' — Cause, Fix, and Troubleshooting Guide
Fix nginx [emerg] the size of shared memory zone 'one' conflicts with already declared size: one zone name declared twice with different sizes. Resolve it.
Read guide - · 8 min read
Nginx Error: 'upstream sent invalid chunked response while reading upstream' — Cause and Fix
Fix nginx 'upstream sent invalid chunked response while reading upstream': the backend sends malformed Transfer-Encoding: chunked framing, causing 502.
Read guide - · 9 min read
Nginx Error: 'upstream SSL certificate verify error: (20:unable to get local issuer certificate)' — Cause, Fix, and Troubleshooting Guide
Fix nginx 'upstream SSL certificate verify error: (20:unable to get local issuer certificate)' from proxy_pass https:// — missing CA bundle, SNI, self-signed.
Read guide - · 8 min read
NGINX Error Guide: '400 Request Header Or Cookie Too Large' — Fix Header Buffers
Fix NGINX '400 Request Header Or Cookie Too Large': size large_client_header_buffers, tame oversized cookies and JWTs, and unblock requests.
Read guide - · 8 min read
NGINX Warning Guide: 'conflicting server name ignored' — Fix Duplicate Vhosts
Fix NGINX 'conflicting server name ignored': find duplicate server_name entries across vhosts and includes, and stop requests hitting the wrong site.
Read guide - · 8 min read
NGINX Error Guide: 'invalid number of arguments in directive' — Fix Config Syntax
Fix 'invalid number of arguments in directive' in NGINX: spot missing semicolons, unquoted values with spaces, and wrong argument counts fast.
Read guide - · 8 min read
NGINX Error Guide: 'no resolver defined to resolve' — Fix Dynamic DNS Upstreams
Fix 'no resolver defined to resolve' in NGINX: add a resolver for variable proxy_pass targets, set the DNS server and TTL, and avoid stale IPs.
Read guide - · 8 min read
NGINX Error Guide: 'unexpected end of file, expecting }' — Fix Unbalanced Braces
Fix 'unexpected end of file, expecting }' in NGINX: find the unclosed block or stray brace across included files and balance your { } pairs.
Read guide - · 9 min read
NGINX Error Guide: 'upstream timed out (110: Connection timed out)' — Fix Slow Backends
Fix 'upstream timed out (110: Connection timed out)' in NGINX: tune proxy read and connect timeouts, find the slow backend, and stop 504s from lag.
Read guide - · 9 min read
NGINX Error Guide: 'worker process exited on signal 11' — Fix Worker Crashes
Fix NGINX 'worker process exited on signal 11': diagnose segfaulting workers from bad modules, coredumps, and OOM kills, and stop the crash loop.
Read guide - · 8 min read
NGINX Error Guide: 'duplicate location' — fix conflicting location blocks
Fix NGINX 'duplicate location' errors that fail nginx -t: find repeated location blocks, included-file collisions, and prefix vs regex confusion, then consolidate and reload safely.
Read guide - · 9 min read
NGINX Error Guide: 'open() failed (2: No such file or directory)' — fix root, alias, and try_files
Fix NGINX 'open() failed (2: No such file or directory)' 404s: diagnose wrong root, alias trailing-slash mangling, broken try_files, SPA fallbacks, and index paths, then reload safely.
Read guide - · 9 min read
NGINX Error Guide: 'unknown directive' — fix typos, missing modules, and misplaced context
Fix NGINX 'unknown directive' errors that fail nginx -t: diagnose typos, missing dynamic modules, wrong config context, unloaded load_module, and third-party directives, then reload safely.
Read guide - · 8 min read
NGINX Error Guide: 'host not found in upstream' — Fix the DNS at Startup
Fix 'host not found in upstream' in NGINX: resolve DNS failures, startup ordering, typos, and missing resolvers so nginx -t passes and the service starts instead of refusing to boot.
Read guide - · 9 min read
NGINX Error Guide: 'SSL_CTX_use_PrivateKey_file failed key values mismatch' — Fix the Cert/Key Pair
Fix 'SSL_CTX_use_PrivateKey_file failed ... key values mismatch' in NGINX: match the certificate to its private key, fix full-chain order, and get TLS to load so NGINX starts.
Read guide - · 9 min read
NGINX Error Guide: 'upstream prematurely closed connection' — Fix the Backend, Not NGINX
Fix 'upstream prematurely closed connection while reading response header' in NGINX: diagnose backend crashes, worker timeouts, keepalive resets, and buffer limits, then apply the real fix.
Read guide - · 9 min read
NGINX Error Guide: 'could not build server_names_hash' Bucket Size Overflow
Fix the NGINX 'could not build server_names_hash' startup error by tuning server_names_hash_bucket_size and server_names_hash_max_size correctly.
Read guide - · 9 min read
NGINX Error Guide: 'no live upstreams while connecting to upstream'
Fix the NGINX no live upstreams error when every upstream block member is ejected by max_fails and fail_timeout passive health checks, causing 502s.
Read guide - · 9 min read
NGINX Error Guide: '(13: Permission denied) while connecting to upstream' (SELinux)
Fix NGINX 13 Permission denied connecting to upstream caused by SELinux on RHEL/Rocky/Alma using httpd_can_network_connect and http_port_t labels.
Read guide - · 9 min read
NGINX Error Guide: 'recv() failed (104: Connection reset by peer)' from Upstream
Fix NGINX recv() failed (104: Connection reset by peer) while reading response header from upstream, caused by backend crashes, OOM kills, and stale keepalive.
Read guide - · 9 min read
NGINX Error Guide: 'rewrite or internal redirection cycle' Infinite Loop
Fix the NGINX 'rewrite or internal redirection cycle while internally redirecting' 500 caused by looping try_files, rewrite, error_page and index rules.
Read guide - · 9 min read
NGINX Error Guide: 'SSL_do_handshake() failed' Protocol and Cipher Mismatch
Fix NGINX SSL_do_handshake() failed errors caused by TLS protocol version and cipher mismatches, no shared cipher, and wrong version number handshakes.
Read guide - · 9 min read
NGINX Error Guide: '(24: Too many open files)' File Descriptor Exhaustion
Fix NGINX 24 Too many open files by raising worker_rlimit_nofile and the systemd LimitNOFILE override that caps the file descriptor limit.
Read guide - · 9 min read
NGINX Error Guide: 'upstream sent no valid HTTP/1.0 header' Malformed Backend Response
Fix the NGINX 'upstream sent no valid HTTP/1.0 header' error when your backend returns a malformed or non-HTTP response to the reverse proxy.
Read guide - · 9 min read
NGINX Error Guide: 'worker_connections are not enough' Connection Pool Exhaustion
Fix NGINX 'worker_connections are not enough' (often 'while connecting to upstream' on a reverse proxy) by raising worker_connections in the events block and aligning worker_rlimit_nofile on each worker.
Read guide - · 11 min read
AI-Assisted NGINX auth_request for SSO and Forward Auth
Protect any backend with NGINX auth_request and an external auth service: the subrequest flow, passing identity headers, handling 401 vs 403, and validating it actually blocks.
Read guide - · 11 min read
AI-Assisted Blue-Green Deployments with NGINX Upstreams
Run blue-green deployments behind NGINX using AI to draft the upstream switch: split_clients canary weighting, a clean cutover, instant rollback, and validating the active color.
Read guide - · 10 min read
AI-Assisted NGINX CORS Configuration Without the Wildcard Trap
Configure CORS in NGINX with AI as a drafting aid: preflight OPTIONS handling, why Access-Control-Allow-Origin wildcard breaks credentials, and validating headers with curl.
Read guide - · 10 min read
AI-Assisted NGINX Compression with gzip and Brotli
Set up NGINX response compression with AI: the right MIME types, sane compression levels, Vary headers, precompressed static files, and not compressing the uncompressible.
Read guide - · 11 min read
AI-Assisted NGINX HTTP/3 and QUIC Setup
Enable HTTP/3 and QUIC on NGINX with AI as a drafting aid: the listen quic directive, Alt-Svc advertisement, UDP 443 firewall gotchas, and validating it actually negotiates h3.
Read guide - · 10 min read
AI-Assisted NGINX Large File Uploads and Request Buffering
Fix 413 errors and slow uploads behind NGINX with AI: client_max_body_size, request buffering vs streaming, timeouts for slow connections, and scoping limits safely.
Read guide - · 11 min read
AI-Assisted NGINX Access and Error Log Analysis
Turn NGINX logs into answers with AI: a structured JSON log_format, upstream timing fields, and AI-assisted jq/awk one-liners to find slow endpoints and 5xx sources fast.
Read guide - · 11 min read
AI-Assisted NGINX Scripting with OpenResty and Lua
Extend NGINX with OpenResty and Lua using AI as a drafting aid: when Lua beats plain config, the request phases, non-blocking cosockets, and keeping modules reviewable.
Read guide - · 10 min read
Diagnosing Slow NGINX Requests With AI and Upstream Timing
Find what's actually slow behind NGINX using AI and timing variables: request_time vs upstream_response_time, connect/header/response breakdown, and proving the bottleneck.
Read guide - · 10 min read
NGINX Error Guide: '403 Forbidden' permissions, index, and SELinux
Fix NGINX 403 Forbidden errors: diagnose file permissions, missing directory index, autoindex, deny rules, wrong root path, and SELinux httpd_t context denials.
Read guide - · 9 min read
NGINX Error Guide: '413 Request Entity Too Large' on uploads
Fix NGINX 413 Request Entity Too Large errors: tune client_max_body_size, align PHP upload limits, fix proxy body size, and place the directive in the right context.
Read guide - · 10 min read
NGINX Error Guide: '502 Bad Gateway' from a Failing Upstream
Fix NGINX 502 Bad Gateway errors: diagnose dead upstreams, wrong proxy_pass ports, crashed PHP-FPM/app servers, SELinux socket blocks, and bad keepalive settings.
Read guide - · 10 min read
NGINX Error Guide: '504 Gateway Time-out' upstream timed out
Fix NGINX 504 Gateway Time-out errors: diagnose slow upstreams, low proxy_read_timeout, FastCGI/PHP-FPM execution limits, DNS resolution stalls, and saturated backends.
Read guide - · 9 min read
NGINX Error Guide: '[emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)'
Fix NGINX bind() to 0.0.0.0:80 failed (98: Address already in use): find the process holding port 80, duplicate listen directives, leftover workers, and conflicting services.
Read guide - · 9 min read
NGINX Error Guide: 'connect() failed (111: Connection refused) while connecting to upstream'
Fix NGINX connect() failed (111: Connection refused) to upstream: diagnose a down backend, wrong proxy_pass port, localhost vs socket mismatch, firewall, and SELinux.
Read guide - · 11 min read
NGINX Error Guide: 'SSL_do_handshake() failed' and certificate errors
Fix NGINX SSL_do_handshake() failed and certificate errors: diagnose missing chains, wrong cert/key pairs, protocol mismatches, SNI issues, and expired certificates.
Read guide - · 9 min read
NGINX Error Guide: 'upstream sent too big header' (502) proxy buffer sizing
Fix NGINX upstream sent too big header (502): tune proxy_buffer_size and proxy_buffers, handle large response headers, big cookies, and FastCGI buffer limits.
Read guide - · 11 min read
AI-Assisted NGINX Performance Tuning Without Cargo-Culting
Use AI to draft and explain NGINX tuning — worker_connections, keepalive, buffers, gzip vs brotli — then measure before and after to keep magic numbers honest.
Read guide - · 10 min read
AI-Assisted NGINX Proxy Caching and Microcaching
Use AI to draft NGINX proxy_cache and microcaching config, then validate hit rates, cache keys, and stale-while-revalidate yourself with curl and nginx -t.
Read guide - · 11 min read
AI-Assisted NGINX Rate Limiting and Abuse Control
Use AI to draft and explain NGINX limit_req and limit_conn config, reason about burst sizing, and pick the right key — then validate under real load yourself.
Read guide - · 11 min read
AI-Assisted NGINX Reverse Proxy for Microservices
Route many backend services behind one NGINX with AI: upstream blocks, proxy_set_header, WebSocket upgrades, and the trailing-slash proxy_pass footgun.
Read guide - · 11 min read
Configuring the NGINX Ingress Controller in Kubernetes With AI
Draft and decode NGINX Ingress manifests with AI: ingressClassName, pathType, cert-manager TLS, and annotations validated with kubectl and the rendered config.
Read guide - · 11 min read
Debugging NGINX 502 Bad Gateway and 504 Gateway Timeout With AI
Decode NGINX 502 and 504 errors fast: read error.log, diagnose upstream failures and timeouts, and use AI to draft fixes you validate with nginx -t.
Read guide - · 10 min read
Hardening NGINX TLS/SSL With AI Without Shipping Hallucinated Ciphers
Use AI to draft NGINX TLS config—ssl_protocols, ssl_ciphers, HSTS, OCSP stapling—then verify every cipher against Mozilla's generator before reload.
Read guide - · 11 min read
Migrating Apache .htaccess to NGINX with AI
Translate Apache mod_rewrite, RedirectMatch, and AuthType Basic into NGINX with AI, then verify every redirect and run nginx -t before you cut over traffic.
Read guide - · 11 min read
Understanding NGINX Location Block Precedence With AI
Decode NGINX location and regex precedence with AI: exact, prefix, ^~, ~ and ~* order, why a URI hits the wrong block, and try_files, validated by nginx -t.
Read guide