Add a message rewrite rule, add a few more deny rules and replaces spaces with tabs.
This commit is contained in:
parent
d8fb2a7b88
commit
12110c641e
|
|
@ -2,6 +2,7 @@
|
||||||
server {
|
server {
|
||||||
listen 127.0.0.1:80;
|
listen 127.0.0.1:80;
|
||||||
server_name 127.0.0.1;
|
server_name 127.0.0.1;
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log;
|
access_log /var/log/nginx/access.log;
|
||||||
error_log /var/log/nginx/error.log;
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
|
|
@ -31,11 +32,21 @@ server {
|
||||||
location ~^.+.(db)$ {
|
location ~^.+.(db)$ {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
location ~ /\.git {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
location ~ /\.lua {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name fusionpbx;
|
server_name fusionpbx;
|
||||||
|
|
||||||
if ($uri !~* ^.*(provision|xml_cdr).*$) {
|
if ($uri !~* ^.*(provision|xml_cdr).*$) {
|
||||||
rewrite ^(.*) https://$host$1 permanent;
|
rewrite ^(.*) https://$host$1 permanent;
|
||||||
break;
|
break;
|
||||||
|
|
@ -47,8 +58,8 @@ server {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#algo
|
#algo
|
||||||
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})(\.(conf))?$" /app/provision/?mac=$1;
|
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})(\.(conf))?$" /app/provision/?mac=$1;
|
||||||
|
|
||||||
#mitel
|
#mitel
|
||||||
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
|
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
|
||||||
|
|
@ -123,11 +134,21 @@ server {
|
||||||
location ~^.+.(db)$ {
|
location ~^.+.(db)$ {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
location ~ /\.git {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
location ~ /\.lua {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443;
|
listen 443;
|
||||||
server_name fusionpbx;
|
server_name fusionpbx;
|
||||||
|
|
||||||
ssl on;
|
ssl on;
|
||||||
ssl_certificate /etc/ssl/certs/nginx.crt;
|
ssl_certificate /etc/ssl/certs/nginx.crt;
|
||||||
ssl_certificate_key /etc/ssl/private/nginx.key;
|
ssl_certificate_key /etc/ssl/private/nginx.key;
|
||||||
|
|
@ -140,8 +161,11 @@ server {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#algo
|
#message media
|
||||||
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})(\.(conf))?$" /app/provision/?mac=$1;
|
rewrite "^/app/messages/media/(.*)/(.*)" /app/messages/message_media.php?id=$1&action=download last;
|
||||||
|
|
||||||
|
#algo
|
||||||
|
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})(\.(conf))?$" /app/provision/?mac=$1;
|
||||||
|
|
||||||
#mitel
|
#mitel
|
||||||
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
|
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
|
||||||
|
|
@ -226,4 +250,13 @@ server {
|
||||||
location ~^.+.(db)$ {
|
location ~^.+.(db)$ {
|
||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
location ~ /\.git {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
location ~ /\.lua {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue