configurations/Nginx/Server Blocks/pbx.ins.conf

35 lines
993 B
Plaintext
Raw Permalink Normal View History

server {
listen 10.8.0.1:443 ssl http2;
listen [::]:443 ssl http2;
server_name pbx.ins;
ssl_certificate /etc/nginx/ssl/pbx-ins.chain.crt;
ssl_certificate_key /etc/nginx/ssl/pbx-ins.key.pem;
client_max_body_size 230M;
client_body_timeout 1h;
2022-02-15 00:26:44 -05:00
root /var/www/html;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
2021-05-01 15:13:49 -04:00
include snippets/fastcgi-php.conf; # server defaults are good
fastcgi_pass unix:/run/php/php7.3-fpm-asterisk.sock;
2021-05-01 15:13:49 -04:00
fastcgi_param HTACCESS on; # disables FreePBX htaccess warning
proxy_read_timeout 800;
}
# 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;
2021-05-01 15:13:49 -04:00
}