• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Websocket Problem on wss

Javad

New Pleskian
I'm having troubles connecting to a WebSocket server via WebSocket Secure connection (wss://) from the browser. Standard connections (ws://) work fine.

To solve this problem in the ispmanager, I used the following code in the site config file and the problem was resolved:
Code:
ProxyPass /echobot ws://coinbazaar.io:9000/echobot
I added the above code in the Additional Apache directives section in plesk. But this method did not resolve my problem and it occurs with error.
Error:
Code:
WebSocket connection to 'wss://coinbazaar.io:9000/echobot' failed: WebSocket opening handshake timed out
 
I have same problem!
Try to connect from client side to wss://example.com/ws
And want to proxy connection to ws// , because my server side is non secure
My apache additional dirrectives:
SSLProxyEngine On
RewriteEngine on
ProxyRequests Off
ProxyPreserveHost on
ProxyPass /ws/ ws://examplae.com:8090/ws
ProxyPassReverse /ws/ ws://examplae.com:8090/ws

It returns 500 error and:
"AH01144: No protocol handler was valid for the URL /ws/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule."

All modules in Apache are enabled.
Javad, did you solve problem? Help anybody please
 
I'm having troubles connecting to a WebSocket server via WebSocket Secure connection (wss://) from the browser. Standard connections (ws://) work fine.

To solve this problem in the ispmanager, I used the following code in the site config file and the problem was resolved:
Code:
ProxyPass /echobot ws://coinbazaar.io:9000/echobot
I added the above code in the Additional Apache directives section in plesk. But this method did not resolve my problem and it occurs with error.
Error:
Code:
WebSocket connection to 'wss://coinbazaar.io:9000/echobot' failed: WebSocket opening handshake timed out
Dear Javad. After 5 days of coding I found totally solution. Use nginx proxy, not apache. It work fine for me

location /echobot/ {
proxy_pass http://echobot:8090;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
 
Back
Top