Examples of configuring WSS connections
Step 1: Publish HTTPS port on the external IP
Note: If the module is behind NAT, the settings should be made on the corresponding proxying device.
Settings for FreePBX with an external address:
By default (if the Firewall module is enabled) FreePBX blocks all ports unknown to it. Let's add the necessary ones in the firewall settings:
example of a link to the corresponding menu item:https://freepbx.example.com/admin/config.php?display=firewall
Step 2: Write a record in DNS for the external address where the module is published
As a rule, it is done through the personal cabinet of the provider that serves the client's domain.
Step 3. Issue SSL certificate
If the client already has a certificate, then copy the files (the certificate itself, the key) to the server with the module. If there is no certificate, then issue it (there are many solutions here).
Option to issue a free certificate through FreePBX: https://freepbx.example.com/admin/config.php?display=certman
Step 4: Specify the path to the certificate in the module
Save the settings.
Step 5. Specify the address of the web sockets to where you want them to go
A reference of the form wss://freepbx.example.com:8078/…
When a certificate is reissued, the service must be restarted for the module to load the updated certificate files.
This example shows how to set up a WSS connection using Nginx or Apache
Configuration for Nginx
Open the Nginx configuration file:
Add configuration for WSS:
Check the configuration and restart Nginx:
Configuration for Apache
Open the Apache configuration file:
Add or modify a configuration block for the WSS:
Restart Apache:
Last updated