I have Nginx on my main server (main.com), that has proxy forwarding to my Windows server (windows.main.com) that is actually hosting Poker Mavens. I access the proxy by visiting https://main.com/poker, which will proxy tunnel to https://windows.main.com:8087
However, Poker Mavens is still trying to connect the the file port (8088) on main.com, and not windows.main.com:8088. Therefore it has a websocket error as it's trying to access the wrong device. In "Internet IP Address" settings, I have windows.main.com set.
Any way to around this?
Nginx and Poker Mavens
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Nginx and Poker Mavens
Your proxy server would also have to forward the websocket connection on the packet port in the same way it did with the http connection on the file port. I don't know anything about Nginx but Cloudflare does this automatically when you use their proxy system.
Re: Nginx and Poker Mavens
Is the packet port just another websocket connection? Or a different protocol?
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Nginx and Poker Mavens
It's the only websocket connection. It works like this: the player points their browser to the File Port on your server, making a normal http/https connection that pulls in the player client. That player client gets the server address using window.location.hostname in Javascript and makes a websocket connection to the Packet Port of that address. So if you're forwarding the http/https connection on the file port then you need to do the same for the ws/wss connection on the packet port.DonnyB wrote:Is the packet port just another websocket connection? Or a different protocol?
I found this, maybe it will help:
https://www.nginx.com/blog/websocket-nginx/
Re: Nginx and Poker Mavens
Thanks for your help Kent. This worked great.