How to install on Plesk panel
You are supposed to have a default or close to default Plesk Onyx Linux VPS with a configured website - PHP, MariaDB/MySQL, Nginx as a frontend proxy and SSL enabled.
Requirements
- A managed with Plesk Onyx Linux server (VPS) with SSH access as a root user or with
sudo
- A website on this server with PHP, MariaDB/MySQL, Nginx as a frontend proxy and SSL enabled
- telnet installed on the server:
apt|yum install telnet
- shell_exec enabled in php.ini (how to check / enable shell_exec)
Step 1
Download blabws-server 32-bit or 64-bit, unzip and upload the folder blabws-server under /opt so that the absolute path to the blabws-server executable file is: /opt/blabws-server/blabws-server
- Upload in binary mode - the two files in blabws-server on your computer & remote server must be exactly the same size
- Make sure the server is executable:
chmod +x /opt/blabws-server/blabws-server
or Filezilla » File Permissions » 755
Step 2
Add the following block to the Nginx config: Plesk » {YourDomainName} » Apache & Nginx Settings » Additional nginx directives:
location /MyWsServer/ {
proxy_pass http://127.0.0.1:9002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 600s;
# connection will be closed after 600 seconds of inactivity
}
and restart Nginx.
Step 3
Download BlaB! WS (client), unzip the content in an empty folder and upload it to your server under your website root directory.
CHMOD blabws/config.php to 666, blabws/attachments to 777, navigate with your browser to YOUR_WEBSITE_URL.COM/blabws/index.php and follow the instructions (3 steps only):
Step 4
At the end of the installation process you'll see a link to the Admin CP - go to Server, and set:
- protocol: wss
- Server port: remove 9002 and leave the box empty
- ProxyPass token: MyWsServer
Save with OKAY, start your websocket server (blabws-server) from BOARD » SERVER STATUS, press the ESC key to display the menu, hit EXIT to go to chat.
Done!