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
|
% endif
|
||||||
}
|
}
|
||||||
|
|
||||||
% if domain_aliases:
|
% if domain_aliases and force_domain:
|
||||||
server {
|
server {
|
||||||
server_name ${' '.join(sorted(domain_aliases))};
|
server_name ${' '.join(sorted(domain_aliases))};
|
||||||
|
|
||||||
|
@ -61,7 +61,11 @@ server {
|
||||||
|
|
||||||
% endif
|
% endif
|
||||||
server {
|
server {
|
||||||
|
% if domain_aliases and not force_domain:
|
||||||
|
server_name ${domain} ${' '.join(sorted(domain_aliases))};
|
||||||
|
% else:
|
||||||
server_name ${domain};
|
server_name ${domain};
|
||||||
|
% endif
|
||||||
|
|
||||||
root ${webroot if webroot else '/var/www/{}/'.format(vhost)};
|
root ${webroot if webroot else '/var/www/{}/'.format(vhost)};
|
||||||
index ${' '.join(index)};
|
index ${' '.join(index)};
|
||||||
|
|
|
@ -81,6 +81,7 @@ def letsencrypt(metadata):
|
||||||
domains[domain] = config.get('domain_aliases', set())
|
domains[domain] = config.get('domain_aliases', set())
|
||||||
vhosts[vhost] = {
|
vhosts[vhost] = {
|
||||||
'ssl': 'letsencrypt',
|
'ssl': 'letsencrypt',
|
||||||
|
'force_domain': True,
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -146,6 +146,7 @@ domain_aliases = [
|
||||||
"mta-sts.franzi.business",
|
"mta-sts.franzi.business",
|
||||||
"mta-sts.kunsmann.eu",
|
"mta-sts.kunsmann.eu",
|
||||||
]
|
]
|
||||||
|
force_domain = false
|
||||||
|
|
||||||
[metadata.nginx.vhosts.redirector]
|
[metadata.nginx.vhosts.redirector]
|
||||||
domain = "kunbox.net"
|
domain = "kunbox.net"
|
||||||
|
|
Loading…
Reference in a new issue