-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.tmpl.diff
30 lines (28 loc) · 1.23 KB
/
nginx.tmpl.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- nginx.tmpl.orig 2016-10-19 00:21:19.000000000 +0000
+++ nginx.tmpl 2017-01-05 13:41:13.000000000 +0000
@@ -184,6 +184,13 @@
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
include /etc/nginx/vhost.d/default_location;
{{ end }}
+ {{ if (exists (printf "/etc/nginx/access.d/%s_access" $host)) }}
+ include {{ printf "/etc/nginx/access.d/%s_access" $host}};
+ {{ else if (exists "/etc/nginx/access.d/default_access") }}
+ include /etc/nginx/access.d/default_access;
+ {{ else }}
+ deny all;
+ {{ end }}
}
}
@@ -218,6 +225,13 @@
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
include /etc/nginx/vhost.d/default_location;
{{ end }}
+ {{ if (exists (printf "/etc/nginx/access.d/%s_access" $host)) }}
+ include {{ printf "/etc/nginx/access.d/%s_access" $host}};
+ {{ else if (exists "/etc/nginx/access.d/default_access") }}
+ include /etc/nginx/access.d/default_access;
+ {{ else }}
+ deny all;
+ {{ end }}
}
}