configuring-nginx

Configure nginx for reverse proxying, load balancing, SSL termination, and static site hosting.

1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/masermediagroup-stack/maser-media --skill configuring-nginx-masermediagroup-stack
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: configuring-nginx
Source: https://github.com/masermediagroup-stack/maser-media/tree/main/.cursor/skills/community/ai-design-components/skills/configuring-nginx
Command: npx skills add https://github.com/masermediagroup-stack/maser-media --skill configuring-nginx-masermediagroup-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up nginx correctly requires navigating complex configuration contexts, TLS settings, proxy headers, and performance tuning, where small mistakes cause downtime or security gaps. This Skill provides production-tested configuration patterns so engineers can deploy web servers, reverse proxies, and load balancers without trial-and-error. ## Core Features & Use Cases - Reverse Proxy & Load Balancing: Proxy traffic to Node.js, Python, or Go backends with proper headers, health checks, and algorithms like least-connections or IP hash. - SSL/TLS Termination: Modern TLS 1.3 configuration with HSTS, OCSP stapling, session caching, and Let's Encrypt integration. - Performance & Security Hardening: Gzip compression, proxy caching, rate limiting, security headers, and DDoS protection patterns. - Use Case: You need to deploy a Node.js API behind nginx with HTTPS, rate limiting on login endpoints, and WebSocket support. This Skill provides the complete server block, upstream definition, and reusable snippets ready to test with nginx -t. ## Quick Start Ask the AI to configure nginx as a reverse proxy with SSL for your backend application running on port 3000.

Frequently Asked Questions about configuring-nginx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure nginx as a reverse proxy for a Node.js app?▼

Define an upstream block pointing to your backend (e.g., 127.0.0.1:3000), then use proxy_pass in a location block with headers like Host, X-Real-IP, and X-Forwarded-For. Set proxy_http_version 1.1 and clear the Connection header to enable keepalive connections.

How to enable HTTPS with TLS 1.3 in nginx?▼

Add listen 443 ssl http2 to your server block, point ssl_certificate and ssl_certificate_key to your certificate files, and set ssl_protocols TLSv1.3 TLSv1.2. Include HSTS headers and OCSP stapling, then redirect port 80 traffic to HTTPS with a 301 return.

What load balancing methods does nginx support?▼

nginx supports round robin (default), least_conn for routing to the least busy server, ip_hash for sticky sessions, and weighted distribution via the weight parameter. Health checks use max_fails and fail_timeout, with backup servers for failover.

Why does nginx return 502 Bad Gateway?▼

A 502 error means the backend server is unreachable or not running. Verify the backend responds with curl, check the proxy_pass address, and on RHEL/CentOS enable SELinux network connections with setsebool -P httpd_can_network_connect 1.

How do I rate limit API requests in nginx?▼

Define a limit_req_zone in the http context with a rate like 5r/s, then apply it in a location block using limit_req with burst and nodelay parameters. Combine with limit_conn_zone to cap concurrent connections per client IP.

When should I use nginx versus Caddy or Traefik?▼

Choose nginx for performance-critical workloads, high connection counts, and fine-grained control over proxying and caching. Caddy suits simpler setups needing automatic HTTPS, while Traefik fits dynamic container environments with service discovery.