Skip to content

Add SSL certs to freepbx on Debian 12#

Introduction#

We will go hrough the steps of adding lets encrypt ssl certs to theweb gui of freepbx

Apache HTTPS Setup#

Click on "Admin" > "Certificate Management" image

Click on "New Certificate" > "Generate Let's Encrypt Certificate" image

Fill in your details and then click on "Generate Certificate" image

Hover over the block "Default" next to your new certificate and then click over the tick that appears. You will get a notification, click on "OK" image

Now ssh to your sip server to configure apache

ssh root@<YOURSIPSERVER>

Check to see that your letsencrypt certificates are on the filesystem

ls /etc/asterisk/keys/

Edit apache to add the certificate locations:

vi /etc/apache2/sites-available/default-ssl.conf

Edit these lines, replacing it with your domain

Note

Replace with the URL / DNS of your FreeSip server

        SSLCertificateFile      /etc/asterisk/keys/<YOUR_SIP_DOMAIN>.pem
        SSLCertificateKeyFile   /etc/asterisk/keys/<YOUR_SIP_DOMAIN>.key

Enable the Apache SSL module and the site configuration:

a2enmod ssl
a2ensite default-ssl.conf
systemctl restart apache2

Go to Settings → Advanced Settings. image

Search for Asterisk Builtin Mini-HTTP server is set to use your new certificate. image

Go to Settings → Asterisk SIP Settings → SIP Settings [chan_pjsip]. image

Scroll down to TLS and select your certificate from the dropdown menu, Click Submit and Apply Config. image