master
Matthew 2024-12-10 19:31:22 -05:00
parent d31607d7b8
commit 6ac54d537b
Signed by: matthew
SSH Key Fingerprint: SHA256:piIXekA9q1p0ZGi4ogFbNY1embip5Ytbi3v8AZ8UYq4
1 changed files with 28 additions and 14 deletions

View File

@ -9,17 +9,31 @@ server {
client_max_body_size 230M; client_max_body_size 230M;
client_body_timeout 1h; client_body_timeout 1h;
root /opt/fusionpbx; root /var/www/html;
index index.php; index index.html index.htm index.php;
location / { location / {
try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ =404;
} }
location ~ \.php$ { location ~ \.php$ {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf; # server defaults are good
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_pass unix:/run/php/php7.3-fpm-asterisk.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param HTACCESS on; # disables FreePBX htaccess warning
include fastcgi_params; proxy_read_timeout 800;
} }
# Block access to orangehrm and orangehrm-5.1 directories
location ~ ^/(orangehrm|orangehrm-5\.1)(/|$) {
deny all;
return 403;
}
# 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;
} }