I have a ratchet chat server file
use Ratchet\\Server\\IoServer;
use Ratchet\\WebSocket\\WsServer;
use MyAppChat\\Chat;
require dirname(__DIR__) . \'/vendor/
It is working for me for ubuntu 18.04.
var ws = new WebSocket('wss://domain.com/ws/');
Enabled proxy modules by running the following command in terminal.
sudo a2enmod proxy proxy_balancer proxy_wstunnel proxy_http
Added these lines in my Apache virtualhost config file(/etc/apache2/sites-available/000-default-le-ssl.conf)
ProxyRequests Off
ProxyPass "/ws/" "ws://domain.com:5555/"
Restarted apache service. And the websocket started working in https.