Nginx WebSocket Proxy: Config, SSL & Load Balancing

websocket.org/guides/infrastructure/nginx/
Nginx sits in front of most WebSocket deployments as a reverse proxy. This guide provides copy-paste configs for proxying, load balancing, SSL/TLS termination, and related operational concerns.

How to Configure WebSocket with Nginx Reverse Proxy

oneuptime.com/blog/post/2026-01-24-websocket-nginx-reverse-proxy/view
Learn how to configure Nginx as a reverse proxy for WebSocket connections, including SSL termination, load balancing, and handling common issues.

How to Configure Nginx as Reverse Proxy for WebSocket

www.tutorialspoint.com/article/how-to-configure-nginx-as-reverse-proxy-for-websocket
Here is a live example to show NGINX working as a WebSocket proxy. This example helps in WebSocket implementation built on Node.js. NGINX acts as a reverse proxy for a simple WebSocket application utilizing ws and Node.js.

How to configure nginx to proxy ws (websocket) protocol

stackoverflow.com/questions/53745789/how-to-configure-nginx-to-proxy-ws-websocket-protocol
I have successfully configurated Nginx as a reverse proxy for my web-application. It correctly redirects requests made from my Angular SPA to Web API written in Asp Core 2.1. However, in my Web API I

How to Configure an Nginx WebSocket Proxy - LinuxCapable

linuxcapable.com/configure-nginx-websocket-proxy/
Configure an Nginx WebSocket proxy with map-based upgrade headers, WSS support, timeout tuning, handshake tests, and fixes for 400, 502, and 504 errors.

NGINX to reverse proxy websockets AND enable SSL (wss://)?

stackoverflow.com/questions/12102110/nginx-to-reverse-proxy-websockets-and-enable-ssl-wss
Set Up Nginx Remember to copy over your old configuration files first if you want to re-use them. Important: you will need to create a tcp {} directive at the highest level in your conf. Make sure it is not inside your http {} directive. The example config below shows a single upstream websocket server, and two proxies for both SSL and Non-SSL.

WebSocket proxying - nginx

nginx.org/en/docs/http/websocket.html
This timeout can be increased with the proxy_read_timeout directive. Alternatively, the proxied server can be configured to periodically send WebSocket ping frames to reset the timeout and check if the connection is still alive.

Nginx WebSocket Proxy Configuration: The Settings That Actually Matter

crtmgr.com/blog/nginx-websocket-proxy-configuration-the-settings-that-actually-matter/
WebSocket proxying looks deceptively simple until you hit the first timeout, load balancer mismatch, or upgrade failure. I have seen people copy a normal reverse proxy block, change the upstream URL, and assume it is done. Then they wonder why the browser reports a failed handshake, why idle connections die at sixty seconds, or why one backend ends up holding almost every socket. This guide ...

Setting up an Nginx Reverse Proxy: A Comprehensive Guide

linuxvox.com/blog/setting-up-an-nginx-reverse-proxy/
This guide will walk you through setting up a basic Nginx reverse proxy, then dive into advanced configurations like SSL termination, load balancing, caching, and WebSocket support. By the end, you'll have a production-ready reverse proxy tailored to your needs.

NGINX Reverse Proxy: Setup Guide with proxy_pass Examples (2026)

www.getpagespeed.com/server-setup/nginx/nginx-reverse-proxy
This guide covers everything you need to configure NGINX as a reverse proxy—from basic proxy_pass directives to advanced load balancing, WebSocket support, and troubleshooting common errors like 502 Bad Gateway and 504 Gateway Timeout.