How to host a websocket in Hestia

Hi, during the last days I have been doing some research about how to properly host a websocket sever. I’m still learning from PHP and I can consider myself as a beginner with Hestia.
First, let’s explain a little bit my context:
I have a website (written in PHP) that basically is waiting for a message broadcasted in a websocket server. The website is published correctly, but I do not know how to publish or host the websocket server.
Whenever I run the server (with php ws-server.php), the clients seem to no recongnize the host or port. I have found that I might have to modify some Apache/nginx configuration, but I do not have any idea of how to…
I have also tried to run the ws-server.php (the websocket server file) with supervisord, as the library used (Ratchet, a websocket library for php) recommends (but they skip the part of Apache / Nginx configuration).

And also, I do not know if the “backend template” should be in “socket” or that means another thing.

To sum up, I would like to host a website under the same domain, and a websocket server at port 8080 (preferably 8080, but if needed can be modified with no problem).

The idea would be:
web hosted: example.com/
and the websocket available at: wss://example.com:8080