Ratchet SSL how to connect on vds ubuntu?

Viewed 18

I'm stumped. I've looked how many times I've looked at similar questions. Yes, they exist, and they have a solution.

But I don't understand what to do there at all. I don't understand the answers. Because I'm a beginner.

I have php7.2, Ubuntu 22.04, apache2. I have done everything according to Ratchet Hello World documentation;

<?php
use Ratchet\Server\IoServer;
use Ratchet\Http\HttpServer;
use Ratchet\WebSocket\WsServer;
use MyApp\Chat;

    require dirname(__DIR__) . '/vendor/autoload.php';

    $server = IoServer::factory(
        new HttpServer(
            new WsServer(
                new Chat()
            )
        ),
        920
    );

    $server->run();

The server itself works if you connect: var conn = new WebSocket("ws://(ip):920");.


How do I connect SSL?

  • I don't know where to put, for example, ProxyPass /wss2/ ws://(ip):920/. And I don't know the rules for that line.
  • Did I create the server correctly?
  • Where is httpd.conf, because I have it nowhere in /etc/apache2/.

enter image description here

Please help in any way, any help is welcome. I did not know that I would take so long to create a server Ratchet. I have been sitting and studying for 4 days, I don't know what to do or where to go anymore.

UPD: My apache configuration path is like this: etc/apache2/apache2.conf

0 Answers
Related