Browse Source

roles/nginx: add alternate fqdn variable

python3
Zolfa 5 years ago
parent
commit
caa2cba6bf
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
3 changed files with 3 additions and 1 deletions
  1. +1
    -0
      roles/nginx/defaults/main.yml
  2. +1
    -0
      roles/nginx/meta/main.yaml
  3. +1
    -1
      roles/nginx/templates/base.j2

+ 1
- 0
roles/nginx/defaults/main.yml View File

@ -2,5 +2,6 @@
host_fqdn: '{{ ansible_hostname }}.dmz.{{ domain }}'
monitoring_vhosts: []
nginx_site_fqdn: '{{ ansible_hostname }}.{{ domain }}'
nginx_site_alternate_fqdns: []
nginx_proxy_protocol: true
...

+ 1
- 0
roles/nginx/meta/main.yaml View File

@ -2,4 +2,5 @@
dependencies:
- role: 'certbot'
certbot_site_fqdn: '{{ nginx_site_fqdn }}'
certbot_site_alternate_fqdns: '{{ nginx_site_alternate_fqdns }}'
...

+ 1
- 1
roles/nginx/templates/base.j2 View File

@ -12,7 +12,7 @@ server {
real_ip_header proxy_protocol;
{% endif %}
server_name {{ nginx_site_fqdn }};
server_name {{ nginx_site_fqdn }} {{ nginx_site_alternate_fqdns | join(' ') }};
# Do not advertise nginx version number
server_tokens off;


Loading…
Cancel
Save