mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-02-24 09:48:14 +00:00
fix: use most specific custom location config first
Co-authored-by: Jonathan Underwood <junderwood@bitcoinbank.co.jp>
This commit is contained in:
parent
c75622db87
commit
efb250da01
@ -70,10 +70,10 @@ location {{ .Path }} {
|
|||||||
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" .Host) }};
|
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" .Host) }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" .Host)) }}
|
{{ if (exists (printf "/etc/nginx/vhost.d/%s_%s_location" .Host (sha1 .Path) )) }}
|
||||||
include {{ printf "/etc/nginx/vhost.d/%s_location" .Host}};
|
|
||||||
{{ else if (exists (printf "/etc/nginx/vhost.d/%s_%s_location" .Host (sha1 .Path) )) }}
|
|
||||||
include {{ printf "/etc/nginx/vhost.d/%s_%s_location" .Host (sha1 .Path) }};
|
include {{ printf "/etc/nginx/vhost.d/%s_%s_location" .Host (sha1 .Path) }};
|
||||||
|
{{ else if (exists (printf "/etc/nginx/vhost.d/%s_location" .Host)) }}
|
||||||
|
include {{ printf "/etc/nginx/vhost.d/%s_location" .Host}};
|
||||||
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
|
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
|
||||||
include /etc/nginx/vhost.d/default_location;
|
include /etc/nginx/vhost.d/default_location;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user