Welcome! Log In Create A New Profile

Advanced

Transparent proxy to websocket server on same machine

Posted by gaspy 
Transparent proxy to websocket server on same machine
March 19, 2019 06:20AM
Hello,

I want nginx and a websocket server on same machine. Users must be able to access both on port 80/443. I do this currently by having 2 separate IPs, but for logistical reasons I'd prefer one IP.

I know nginx can act as a proxy for a websocket server, but I also need the original IP to be carried to the websocket server, without additional headers.

I saw a small tutorial on this, so I know it's possible, but it assumed two separate servers and it involved iptables and routing. While I'm comfortable with nginx, I never had to edit iptables and routes manually and I don't want to mess them up.

What would be the simplest way to accomplish this?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 186
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready