Ratchet Websocket Apache Proxy

I have implemented a ratchet websocket on a symfony project, connection to the websocket works perfectly on machines from the same network, but when I implemented it on a distant machine it didn’t work (CONNECTION TIMED OUT).

here is my Ratchet Code on Symfony Project

protected function configure()
        ->setDescription('Start chat server');

protected function execute(InputInterface $input, OutputInterface $output)
    $server = IoServer::factory(
        new HttpServer(
            new WsServer(
                new Chat()

here is the apache configuration on the distant machine:

    <VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName e814c73.online-server.cloud

    DocumentRoot /var/www/dailyway-dev.fr

    <Directory /var/www/dailyway-dev.fr>
            Options -Indexes +FollowSymLinks
            AllowOverride All
            Require all granted

    ProxyPass "/wss2/" "ws://e814c73.online-server.cloud:8036/"

    ErrorLog /home/dailyway/logs/error.log

When i try ws://e814c73.online-server.cloud:8036/wss2/ it says CONNECTION TIMED OUT. By the way i am using websocket.org for the test.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *