bundles/nginx: add option to not redirect domain aliases
This commit is contained in:
parent
050931edf2
commit
698f203936
3 changed files with 7 additions and 1 deletions
|
@ -22,7 +22,7 @@ server {
|
|||
% endif
|
||||
}
|
||||
|
||||
% if domain_aliases:
|
||||
% if domain_aliases and force_domain:
|
||||
server {
|
||||
server_name ${' '.join(sorted(domain_aliases))};
|
||||
|
||||
|
@ -61,7 +61,11 @@ server {
|
|||
|
||||
% endif
|
||||
server {
|
||||
% if domain_aliases and not force_domain:
|
||||
server_name ${domain} ${' '.join(sorted(domain_aliases))};
|
||||
% else:
|
||||
server_name ${domain};
|
||||
% endif
|
||||
|
||||
root ${webroot if webroot else '/var/www/{}/'.format(vhost)};
|
||||
index ${' '.join(index)};
|
||||
|
|
|
@ -81,6 +81,7 @@ def letsencrypt(metadata):
|
|||
domains[domain] = config.get('domain_aliases', set())
|
||||
vhosts[vhost] = {
|
||||
'ssl': 'letsencrypt',
|
||||
'force_domain': True,
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -146,6 +146,7 @@ domain_aliases = [
|
|||
"mta-sts.franzi.business",
|
||||
"mta-sts.kunsmann.eu",
|
||||
]
|
||||
force_domain = false
|
||||
|
||||
[metadata.nginx.vhosts.redirector]
|
||||
domain = "kunbox.net"
|
||||
|
|
Loading…
Reference in a new issue