Skip to main content

NGINX Timeout Directives: Complete Configuration Guide


by Danila Vershinin, January 26, 2026

Master all NGINX timeout directives including proxy_read_timeout, client_body_timeout, keepalive_timeout, and send_timeout. Learn when to use each, production-ready values, and how to diagnose timeout issues.

Read More...

NGINX Basic Auth with htpasswd: Complete Configuration Guide


by Danila Vershinin,

Learn how to configure NGINX basic authentication using htpasswd. This complete guide covers password file creation, hash algorithms, WordPress protection, staging site security, SSL integration, and troubleshooting.

Read More...

NGINX Upstream Keepalive: Connection Pooling Guide [2026]


by Danila Vershinin,

Learn how to configure NGINX upstream keepalive for connection pooling to your backend servers. This comprehensive guide covers the keepalive directive, tuning parameters, preventing TIME_WAIT socket exhaustion, and optimizing microservices and API gateway performance.

Read More...

NGINX Proxy Cache & Microcaching: Complete Guide


by Danila Vershinin,

Master NGINX proxy cache and microcaching to achieve up to 400x performance improvement. This comprehensive guide covers proxy_cache_path, proxy_cache_valid, thundering herd prevention with proxy_cache_lock, stale-while-revalidate patterns, and microcaching for dynamic content. Includes production-ready configurations tested on Rocky Linux and AlmaLinux.

Read More...

NGINX Rewrite Rules: The Complete Guide to URL Rewriting


by Danila Vershinin, January 25, 2026

Master NGINX rewrite rules and URL rewriting with this comprehensive guide. Learn the difference between return and rewrite directives, capturing groups, rewrite flags, and real-world SEO migration scenarios with tested configurations.

Read More...

NGINX Gzip Compression: The Complete Configuration Guide


by Danila Vershinin,

Learn how to configure NGINX gzip compression for optimal web performance. This comprehensive guide covers gzip_types, gzip_comp_level, gzip_min_length, and all other gzip directives with insights from NGINX source code analysis and production-tested configurations.

Read More...

NGINX WebSocket Proxy: HTTP Upgrade and WSS Guide


by Danila Vershinin,

Learn how to configure NGINX as a WebSocket proxy for real-time applications. This complete guide covers HTTP upgrade mechanism, wss:// SSL configuration, Socket.io setup, load balancing, and troubleshooting with production-ready examples.

Read More...

NGINX CORS Configuration: The Complete Guide


by Danila Vershinin, January 24, 2026

Learn how to properly configure CORS in NGINX with this comprehensive guide. Discover why most tutorials are wrong, understand the critical `always` parameter, handle preflight requests, and implement production-ready configurations for credentials and multiple origins.

Read More...

NGINX 502 Bad Gateway: Every Cause and Fix (Complete Guide)


by Danila Vershinin,

Learn how to fix NGINX 502 Bad Gateway errors. This comprehensive guide covers every cause including PHP-FPM issues, socket permissions, buffer problems, and more with tested solutions.

Read More...

NGINX Location Priority: Complete Regex Matching Guide


by Danila Vershinin,

Master NGINX location priority and regex matching. Learn how =, ^~, ~, and ~* modifiers work, understand the matching algorithm from NGINX source code, avoid common security pitfalls, and use tools like Gixy to validate your configuration.

Read More...