Using Caddy instead of Apache in FreePBX

I went through a similar exercise with nginx + php-fpm a couple years ago. Nginx for FreePBX

Here’s where I pulled the .htaccess dirctives into the nginx config:

    # disallows the things that the FreePBX .htaccess files disallow
    location ~ (/\.ht|/\.git|\.ini$|/libraries|/helpers|/i18n|/node|/views/.+php$) {
        deny all;
    }

    # from the api module .htaccess file
    rewrite ^/admin/api/([^/]*)/([^/]*)/?(.*)?$ /admin/api/api.php?module=$1&command=$2&route=$3 last;

I think we could combine our notes into a couple “Apache Alternatives” articles for the wiki.

1 Like