reverse proxy tcp and http on the same port #73

beurdouche opened this Issue Mar 25, 2013 · 1 comment


None yet
2 participants

I am having an unfortunate problem but I am not sure if it depends on your module or on nginx...

I want to set nginx to listen to port 443 for both https and websocket streams and reverse proxify them to a webserver and a nodejs so browsers don't trigger the "external content" security alert

Problem is: it seems I can't bind to the same port =s
Is there something to do ?

Thanks ! B.

tcp { upstream websockets { server; check interval=3000 rise=2 fall=5 timeout=1000; } server { listen 8080; proxy_pass websockets; } }

http {
index index.html index.htm index.php;
upstream webserver {
server {
listen 8080;
location / {
proxy_pass http://webserver;


yaoweibin commented Mar 26, 2013

It's a known issue. You can't use the same port with http module. Maybe you can use the nginx-1.3.13+ which now supports websocket natively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment