Merge 77196e69bd
into e762468759
This commit is contained in:
commit
21f7731955
1 changed files with 12 additions and 1 deletions
11
nginx.tmpl
11
nginx.tmpl
|
@ -246,8 +246,19 @@ server {
|
||||||
listen [::]:80 {{ $default_server }};
|
listen [::]:80 {{ $default_server }};
|
||||||
{{ end }}
|
{{ end }}
|
||||||
access_log /var/log/nginx/access.log vhost;
|
access_log /var/log/nginx/access.log vhost;
|
||||||
|
|
||||||
|
{{/* Add in includes to allow vhost includes*/}}
|
||||||
|
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
|
||||||
|
include {{ printf "/etc/nginx/vhost.d/%s" $host }};
|
||||||
|
{{ else if (exists "/etc/nginx/vhost.d/default") }}
|
||||||
|
include /etc/nginx/vhost.d/default;
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* If none of the locations match in the vhosts then redirect to the https page */}}
|
||||||
|
location {
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|
Loading…
Reference in a new issue