Skip to content

Commit 9bb17bf

Browse files
authored
Update nginx.tmpl
1 parent 2565939 commit 9bb17bf

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

nginx.tmpl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,13 @@ server {
351351
}
352352
}
353353
{{else}}
354+
355+
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
356+
include {{ printf "/etc/nginx/vhost.d/%s" $host }};
357+
{{ else if (exists "/etc/nginx/vhost.d/default") }}
358+
include /etc/nginx/vhost.d/default;
359+
{{ else }}
360+
354361
server {
355362
server_name {{ $host }};
356363
listen 443 ssl http2 {{ $default_server }};
@@ -415,12 +422,6 @@ server {
415422
add_header Strict-Transport-Security "{{ trim $hsts }}" always;
416423
{{ end }}
417424

418-
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
419-
include {{ printf "/etc/nginx/vhost.d/%s" $host }};
420-
{{ else if (exists "/etc/nginx/vhost.d/default") }}
421-
include /etc/nginx/vhost.d/default;
422-
{{ end }}
423-
424425
location / {
425426
{{ if eq $proto "uwsgi" }}
426427
include uwsgi_params;
@@ -444,6 +445,8 @@ server {
444445
{{ end }}
445446
}
446447
}
448+
449+
{{ end }}
447450
{{end}}
448451

449452
{{ end }}

0 commit comments

Comments
 (0)