Secure Your Ubuntu-based FreePBX with HTTPS Today!

Ok, I have install the Freepbx on my ubuntu server.

But it only open in http. I already got my ssl from ssls.com but how to add it to my freepbx website?

I used Webmin to add a virtual server, yoursite.name, with port 443 in Apache2. However, upon attempting to access it, I encountered a familiar problem.

I checked the Apache log again and found the following error:

[rewrite:error] [pid 649171] [client yoursite.name:55520] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is forbidden due to its similar ability to circumvent directory restrictions: /var/www/html/admin/

What was this issue? After some research, I finally found a solution.

You need to edit your yoursite.name.conf file, located in /etc/apache2/sites-available/yoursite.name.

The configuration should be updated as follows:

———————————————————

<VirtualHost *:443>
DocumentRoot “/var/www/html” RewriteEngine On ServerName yoursite.name
<Directory “/var/www/html”>
Options +FollowSymLinks
Require all granted
</Directory>
SSLEngine on SSLProtocol +TLSv1.2 +TLSv1.3 SSLCertificateFile
/etc/ssl/yoursite.name/yoursite.name.crt SSLCertificateKeyFile
/etc/ssl/yoursite.name/yoursite.name_key.txt SSLCACertificateFile
/etc/ssl/yoursite.name/yoursite.name.ca-bundle
</VirtualHost>

——————————————————

After I add “Options +FollowSymLinks” and  after adding these lines, the problem was solved. 🙂