We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
This is based in a running https configuration for Apache 2.4. Ratchet and Apache on the same server.
$ sudo a2enmod proxy proxy_http proxy_wstunnel
$ sudo vim /etc/apache2/sites-available/your-site.conf
Add this line under
<VirtualHost *:443> [...] ProxyPass "/wss2/" "ws://127.0.0.1:8080/"
And the restart apache
$ sudo service apache2 restart
In config.yml
gos_web_socket: server: port: 8080 #The port the socket server will listen on host: 127.0.0.1 #The host ip to bind to
Launch ratchet
$ php app/console gos:websocket:server
var webSocket = WS.connect("wss:/www.your-site.xxx/wss2/"); webSocket.on("socket/connect", function(session){ //session is an Autobahn JS WAMP session. console.log("Successfully Connected!"); })