{"id":194,"date":"2024-03-19T17:07:36","date_gmt":"2024-03-19T21:07:36","guid":{"rendered":"https:\/\/www.tocobee.com\/?p=194"},"modified":"2024-03-19T17:07:36","modified_gmt":"2024-03-19T21:07:36","slug":"secure-your-ubuntu-based-freepbx-with-https-today","status":"publish","type":"post","link":"https:\/\/www.tocobee.com\/?p=194","title":{"rendered":"Secure Your Ubuntu-based FreePBX with HTTPS Today!"},"content":{"rendered":"<p>Ok, I have install the Freepbx on my ubuntu server.<\/p>\n<p>But it only open in http. I already got my ssl from ssls.com but how to add it to my freepbx website?<\/p>\n<p>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.<\/p>\n<p>I checked the Apache log again and found the following error:<\/p>\n<div class=\"dark bg-gray-950 rounded-md\">\n<div class=\"flex items-center relative text-token-text-secondary bg-token-main-surface-secondary px-4 py-2 text-xs font-sans justify-between rounded-t-md\"><strong>[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\/<\/strong><\/div>\n<\/div>\n<p>What was this issue? After some research, I finally found a solution.<\/p>\n<p>You need to edit your <code>yoursite.name.conf<\/code> file, located in <code>\/etc\/apache2\/sites-available\/yoursite.name<\/code>.<\/p>\n<p>The configuration should be updated as follows:<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<div class=\"p-4 overflow-y-auto\"><strong>&lt;VirtualHost *:443&gt; <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>DocumentRoot &#8220;\/var\/www\/html&#8221; RewriteEngine On ServerName yoursite.name <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>&lt;Directory &#8220;\/var\/www\/html&#8221;&gt; <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>Options +FollowSymLinks <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>Require all granted <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>&lt;\/Directory&gt; <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>SSLEngine on SSLProtocol +TLSv1.2 +TLSv1.3 SSLCertificateFile <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>\/etc\/ssl\/yoursite.name\/yoursite.name.crt SSLCertificateKeyFile <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>\/etc\/ssl\/yoursite.name\/yoursite.name_key.txt SSLCACertificateFile <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>\/etc\/ssl\/yoursite.name\/yoursite.name.ca-bundle <\/strong><\/div>\n<div class=\"p-4 overflow-y-auto\"><strong>&lt;\/VirtualHost&gt;<\/strong><\/div>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>After I add &#8220;<strong><span style=\"color: #0000ff;\">Options +FollowSymLinks<\/span><\/strong>&#8221; and\u00a0 after adding these lines, the problem was solved. \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-194","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.tocobee.com\/index.php?rest_route=\/wp\/v2\/posts\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tocobee.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tocobee.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tocobee.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tocobee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=194"}],"version-history":[{"count":4,"href":"https:\/\/www.tocobee.com\/index.php?rest_route=\/wp\/v2\/posts\/194\/revisions"}],"predecessor-version":[{"id":198,"href":"https:\/\/www.tocobee.com\/index.php?rest_route=\/wp\/v2\/posts\/194\/revisions\/198"}],"wp:attachment":[{"href":"https:\/\/www.tocobee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tocobee.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tocobee.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}