1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/pbx/templates/freepbx-nginx.conf.j2
2021-08-09 18:41:46 -05:00

31 lines
1.2 KiB
Django/Jinja

location ~ ^/freepbx(|/.*)$ { # '~' -> '~*' for case-insensitive regex
root /var/www/html;
# root {{ freepbx_install_dir }}; # /var/www/html/freepbx
# root {{ doc_root }}; # /library/www/html
# location ~ ^/freepbx {
# root {{ doc_root }};
# }
location ~ ^/freepbx(.*)\.php(.*)$ {
alias {{ freepbx_install_dir }}$1.php$2;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass unix:/run/php/php-asterisk.sock;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
#fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param HTACCESS on; # disables FreePBX htaccess warning
}
# disallows the things that the FreePBX .htaccess files disallow
location ~ /freepbx(/\.ht|/\.git|\.ini$|/libraries|/helpers|/i18n|/node|/views/.+php$) {
deny all;
}
# from the api module .htaccess file
rewrite ^/freepbx/admin/api/([^/]*)/([^/]*)/?(.*)?$ /freepbx/admin/api/api.php?module=$1&command=$2&route=$3 last;
}