Nginx and Poker Mavens

For discussion of the Poker Mavens server module and other administration topics
Post Reply
DonnyB
Posts: 16
Joined: Thu Jul 30, 2020 11:44 am

Nginx and Poker Mavens

Post by DonnyB »

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?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Nginx and Poker Mavens

Post by Kent Briggs »

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.
DonnyB
Posts: 16
Joined: Thu Jul 30, 2020 11:44 am

Re: Nginx and Poker Mavens

Post by DonnyB »

Is the packet port just another websocket connection? Or a different protocol?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Nginx and Poker Mavens

Post by Kent Briggs »

DonnyB wrote:Is the packet port just another websocket connection? Or a different protocol?
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.

I found this, maybe it will help:

https://www.nginx.com/blog/websocket-nginx/
DonnyB
Posts: 16
Joined: Thu Jul 30, 2020 11:44 am

Re: Nginx and Poker Mavens

Post by DonnyB »

Thanks for your help Kent. This worked great.
Post Reply