reverse-proxy

Configure nginx reverse proxy with upstream groups, headers, and WebSocket support.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill reverse-proxy-theslashdojo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reverse-proxy
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/nginx/reverse-proxy
Command: npx skills add https://github.com/theslashdojo/dojo --skill reverse-proxy-theslashdojo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires nginx, and includes scripts (resource) components.

What problem does it solve?

This Skill helps operators and developers place nginx in front of application servers to forward client requests, preserve client identity, distribute load across backends, handle WebSocket and SSE streams, and provide optional response caching and failover so applications remain performant and reachable.

Core Features & Use Cases

  • Centralized reverse proxy configuration with upstream groups and multiple load balancing methods for stateless and stateful affinity.
  • Proper header forwarding and HTTP/1.1 keepalive settings so backends receive original Host, client IP, and protocol information.
  • WebSocket and Server-Sent Events support with increased timeouts and connection upgrade handling, plus optional proxy caching and failover strategies.
  • Use case: Put nginx in front of a Node.js cluster to terminate TLS, load balance traffic with least-connections, proxy WebSocket chat connections, and cache GET responses for static API endpoints.

Quick Start

Generate a reverse proxy configuration named myapp that load balances 127.0.0.1:3000 and 127.0.0.1:3001, uses least-conn, and enables WebSocket proxying on path /ws/.

Frequently Asked Questions about reverse-proxy

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

FAQPage Schema
How do I configure nginx as a reverse proxy for HTTP and WebSocket traffic?

Nginx reverse proxying forwards client requests to backend application servers using proxy_pass and upstream groups. It preserves client identity by forwarding headers like Host and client IP, while distributing load across multiple backend application instances.

How do I set up nginx load balancing across multiple backend application servers?

Nginx load balancing uses upstream groups to distribute traffic across backend application servers. You can apply methods like least-connections for stateless traffic or configure session affinity for stateful applications, ensuring requests are routed efficiently to available backends.

Does nginx reverse proxy support WebSocket and Server-Sent Events streaming?

Nginx reverse proxy supports WebSocket and Server-Sent Events streaming. It requires configuring connection upgrade handling for WebSockets and increasing proxy timeouts to maintain persistent streaming connections without premature termination.

How do I preserve client IP and Host headers when proxying traffic through nginx?

To preserve client IP and Host headers in nginx, configure proper header forwarding using proxy headers. This ensures backend application servers receive the original Host, client IP, and protocol information from the incoming request.

Can I enable response caching and failover with an nginx upstream configuration?

Nginx upstream configuration supports optional response caching for GET requests and failover strategies. Upstream health and failover directives automatically reroute traffic if a backend application server becomes unreachable, maintaining application availability.

What are the limitations of using nginx for proxy_pass routing and load balancing?

Nginx proxy_pass routing requires correct HTTP/1.1 keepalive settings and timeout configurations to avoid connection drops. Improper upstream health directive configuration can lead to requests being routed to failed backend application servers during failover.