0

I am using https and websocket connection for Laravel project. I have setup virtual host like following:

<VirtualHost *:80>
ServerName test.example.com
ServerAdmin test.example.com
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>

<VirtualHost *:443>

ServerAdmin test.example.com
ServerName test.example.com

SSLEngine on
SSLCertificateFile "cert.pem"
SSLCertificateKeyFile "privkey.pem"
SSLCertificateChainFile "chain.pem"

SSLProxyEngine On
ProxyPreserveHost On
ProxyRequests Off

ProxyPass /wss wss://test.example.com:8090/
ProxyPassReverse /wss wss://test.example.com:8090/

DocumentRoot "/var/www/html/laravel/public"
<Directory "/var/www/html/laravel/public">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride all
    Require all granted
</Directory>
</VirtualHost>

But it is showing error in browser:

   WebSocket connection to 'wss://test.example.com:8090/' failed: WebSocket opening handshake timed out

Configuration is like following:

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      
6426/systemd-resolv
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      
937/sshd
tcp        0      0 {{MY publicIP}}:8090     0.0.0.0:*               LISTEN      
11576/php
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      
19335/mysqld

Can you please help us what can be issue?

Thanks in advance

0 Answers0