Currently running a socket web server by supervisor on my server. Apache is also active on the same server and using the following apache directives to reverse proxy web-socket which make it possible to access socket server through web (using domain):
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule .* ws://127.0.0.1:6001%{REQUEST_URI} [P,L]
Some time ago, the connection of the web socket suddenly became problematic. when I try to connect to the socket server The connection starts and the upgrade headers are sent to the user's browser, but after that no message is sent to the user by the web-socket server. This only happens when communicating via Apache, and connecting directly to the ip / port of socket server (even throw web with ip and port of server) does not cause this problem and everything works fine.
source https://stackoverflow.com/questions/68200145/websocket-with-php-and-apache-reverse-proxy
Comments
Post a Comment