Support per-VIRTUAL_HOST Nginx conf files
This commit is contained in:
parent
a431122d8b
commit
2010332395
1 changed files with 8 additions and 0 deletions
|
@ -107,6 +107,10 @@ server {
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
|
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
|
||||||
|
|
||||||
|
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
|
||||||
|
include {{ printf "/etc/nginx/vhost.d/%s" $host }};
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass {{ $proto }}://{{ $host }};
|
proxy_pass {{ $proto }}://{{ $host }};
|
||||||
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
|
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
|
||||||
|
@ -120,6 +124,10 @@ server {
|
||||||
server {
|
server {
|
||||||
server_name {{ $host }};
|
server_name {{ $host }};
|
||||||
|
|
||||||
|
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
|
||||||
|
include {{ printf "/etc/nginx/vhost.d/%s" $host }};
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass {{ $proto }}://{{ $host }};
|
proxy_pass {{ $proto }}://{{ $host }};
|
||||||
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
|
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
|
||||||
|
|
Reference in a new issue