|
@@ -2,7 +2,7 @@
|
|
|
server {
|
|
|
listen 127.0.0.1:80;
|
|
|
server_name 127.0.0.1;
|
|
|
-
|
|
|
+
|
|
|
#set the log files
|
|
|
error_log /var/log/nginx/error.log info;
|
|
|
access_log /var/log/nginx/access.log;
|
|
@@ -22,7 +22,7 @@ server {
|
|
|
location = /50x.html {
|
|
|
root /usr/local/www/nginx-dist;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
|
location ~ \.php$ {
|
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
@@ -30,7 +30,7 @@ server {
|
|
|
fastcgi_param SCRIPT_FILENAME /usr/local/www/fusionpbx$fastcgi_script_name;
|
|
|
include fastcgi_params;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#disable viewing of .htaccess, htpassword, and .db
|
|
|
location ~ /\.htaccess {
|
|
|
deny all;
|
|
@@ -46,7 +46,7 @@ server {
|
|
|
server {
|
|
|
listen 80;
|
|
|
server_name fusionpbx;
|
|
|
-
|
|
|
+
|
|
|
#set the log files
|
|
|
error_log /var/log/nginx/error.log info;
|
|
|
access_log /var/log/nginx/access.log;
|
|
@@ -58,7 +58,7 @@ server {
|
|
|
alias /usr/local/www/dehydrated;
|
|
|
}
|
|
|
|
|
|
- #set the default index files
|
|
|
+ #set the default index files
|
|
|
location / {
|
|
|
root /usr/local/www/fusionpbx;
|
|
|
index index.php index.html index.htm;
|
|
@@ -75,7 +75,7 @@ server {
|
|
|
rewrite ^(.*)/api/(.*)$ $1/api/index.php?rewrite_uri=$2 last;
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#algo
|
|
|
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})\.conf" /app/provision/?mac=$1&file=algom%7b%24mac%7d.conf last;
|
|
|
|
|
@@ -119,6 +119,10 @@ server {
|
|
|
rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1;
|
|
|
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
|
|
|
|
|
|
+ #Digium
|
|
|
+ rewrite "^.*/provision/([A-Fa-f0-9]{12})-contacts\.cfg$" "/app/provision/?mac=$1&file={%24mac}-contacts.cfg";
|
|
|
+ rewrite "^.*/provision/([A-Fa-f0-9]{12})-smartblf\.cfg$" "/app/provision/?mac=$1&file={%24mac}-smartblf.cfg";
|
|
|
+
|
|
|
|
|
|
#nginx settings
|
|
|
client_max_body_size 128M;
|
|
@@ -129,7 +133,7 @@ server {
|
|
|
location = /50x.html {
|
|
|
root /usr/local/www/nginx-dist;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
|
|
location ~ \.php$ {
|
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
@@ -137,7 +141,7 @@ server {
|
|
|
fastcgi_param SCRIPT_FILENAME /usr/local/www/fusionpbx$fastcgi_script_name;
|
|
|
include fastcgi_params;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
#disable viewing of .htaccess, htpassword, and .db
|
|
|
location ~ /\.htaccess {
|
|
|
deny all;
|
|
@@ -232,6 +236,10 @@ server {
|
|
|
rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1;
|
|
|
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
|
|
|
|
|
|
+ #Digium
|
|
|
+ rewrite "^.*/provision/([A-Fa-f0-9]{12})-contacts\.cfg$" "/app/provision/?mac=$1&file={%24mac}-contacts.cfg";
|
|
|
+ rewrite "^.*/provision/([A-Fa-f0-9]{12})-smartblf\.cfg$" "/app/provision/?mac=$1&file={%24mac}-smartblf.cfg";
|
|
|
+
|
|
|
#nginx settings
|
|
|
client_max_body_size 128M;
|
|
|
client_body_buffer_size 128k;
|