Update nginx.tmpl
Prevent incorrect loading of wildcard domains in vhost configuration loading
This commit is contained in:
parent
b0c6c9f67e
commit
81e3e145c1
1 changed files with 2 additions and 2 deletions
|
@ -353,7 +353,7 @@ server {
|
|||
{{ end }}
|
||||
|
||||
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
|
||||
include {{ printf "/etc/nginx/vhost.d/%s" $host }};
|
||||
include {{ printf "/etc/nginx/vhost.d/%s" (replace $host "*" "\\*" -1) }};
|
||||
{{ else if (exists "/etc/nginx/vhost.d/default") }}
|
||||
include /etc/nginx/vhost.d/default;
|
||||
{{ end }}
|
||||
|
@ -376,7 +376,7 @@ server {
|
|||
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};
|
||||
{{ end }}
|
||||
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" $host)) }}
|
||||
include {{ printf "/etc/nginx/vhost.d/%s_location" $host}};
|
||||
include {{ printf "/etc/nginx/vhost.d/%s_location" (replace $host "*" "\\*" -1) }};
|
||||
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
|
||||
include /etc/nginx/vhost.d/default_location;
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue