-
Notifications
You must be signed in to change notification settings - Fork 29
How to configure WSS working with HTTPS? #35
Comments
Hi @chantrea It duplicates #12 please note that you answered and gave instructions Example: <VirtualHost *:443>
ServerName website.com
RewriteEngine On
# When Upgrade:websocket header is present, redirect to ws
# Using NC flag (case-insensitive) as some browsers will pass Websocket
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule ^/ws/(.*) wss://localhost:8888/ws/$1 [P,L]
# All other requests go to http
ProxyPass "/" "http://localhost:8888/" You can google information, for example on request: |
I think I also did this way but still have no luck. |
Hi, this is my setting when used this library,
You can try that setup.. and don't forget to added :
|
Thank you for your response. I already follow your instruction.
in my route
Error is
|
Is you'r already installed the ssl certificated? and installed this packages?
|
Yes certificates is 100% working because installed it more than a years and been using https all the time.
…Sent from my iPhone
On Nov 22, 2018, at 8:32 PM, Ramadhan ***@***.***> wrote:
ProxyRequests Off ProxyPass /wss/ ws://dev.mydomain.com:2000/ ProxyPassReverse /wss/ ws://dev.mydomain.com:2000/ RewriteEngine on RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC] RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC] RewriteRule .* ws://dev.mydomain.com:2000%{REQUEST_URI} [P]
Is you'r already installed the ssl certificated?
and installed this packages?
sudo a2enmod proxy && sudo a2enmod proxy_http && sudo service apache2 restart
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Anyway i am using AWS linux 2 not ubuntu. It is on the top of CentOS |
Come on guy I tried everythings but it is not working like you all said. Please guy me step by step. |
Not working on my side too. Does anybody resolved connection with wss? |
Hi here are my steps
My Apache is 2.4.34 on Centos server
in my route
$socket->route('/myclass', new MyClass(), ['*']);
<VirtualHost *:443>
//All Certificates and domain is working fine here.
SSLProxyEngine On
ProxyPreserveHost On
ProxyRequests Off
ProxyPass /wss/ ws://dev.domain.com:2000/ retry=0 keepalive=On
ProxyPassReverse /wss/ ws://dev.domain.com:2000/ retry=0
In client JavaScript Code
pace.min.js:2 WebSocket connection to 'wss://dev.domain.com/wss/myclass' failed: Error during WebSocket handshake: Unexpected response code: 503
And It is working find in localhost with ws://localhost:2000/myclass
Without HTTPS
The text was updated successfully, but these errors were encountered: