I have compiled nginx with the tcp_proxy_module by following this guide : https://stackoverflow.com/questions/12102110/nginx-to-reverse-proxy-websockets-and-enable-ssl-wss
What I want to do is to be able to forward :
TCP url1.com:443 --forward to websocket--> 1234 HTTP url2.com:443 proxy localhost:1235 HTTP url3.com:443 proxy localhost:1236
The HTTP part works as expected since it's a different server_name. But the problem is with the TCP proxy, i'm getting :
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
How would I achieve that goal ?
-- edit : from the module's github https://github.com/yaoweibin/nginx_tcp_proxy_module
You can't use the same listening port with HTTP modules.