Answer the question
In order to leave comments, you need to log in
How to do proper websocket proxying?
I recently started migrating chat to my server, which runs on sockets. I ran into a problem that the ws:// protocol does not work on https://. Googled, the answer was the same: "We need to make a proxy." In this case, I do not understand anything at all, so ....
This socket server is working: ws://194.58.121.250:7777
I tried to make a proxy, but nothing came out at all. This is what I wrote in the apache2.conf file:
<VirtualHost *:*>
ProxyPreserveHost On
ProxyPass /websocket ws://194.58.121.250:7777
ProxyPassReverse /websocket ws://194.58.121.250:7777
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Proxy is not required.
It is enough to listen to wss i.e. attach a domain certificate to the socket server ssl.
And how to do this, you can read in the dock of the module that you use for the socket server.
http > ws
https > wss
https://learn.javascript.ru/websockets#wss
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question