ernestdefoe I have setup realtime in a plesk environment - was a bit of a pain but I managed to get it running on multiple sites. Disclaimer: You need to make sure the port you are using is allowed through you firewall settings.
- Modify your
config.php
file to include this block (I use 2083 as a port in this example):
'websocket' => [
'server-port' => '2083',
'js-client-port' => '443',
'php-client-port' => '2083',
'php-client-host' => 'localhost',
'php-client-secure' => false,
]
- Add to your Nginx configuration the following (modify the ID and port to your configuration):
location ^~ /app/ID {
proxy_pass http://127.0.0.1:2083;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
- Add a scheduled task within your domains config to run the scheduler (I run it once daily just to make sure it's running). You will need to modify paths specific to your installation:
cd /var/www/vhosts/YOURDOMAIN/httpdocs && /opt/plesk/php/8.1/bin/php flarum realtime:serve >> /dev/null 2>&1
If you have done that it should work 😉