diff --git a/templates/etc/apache2/sites-enabled/template.conf b/templates/etc/apache2/sites-enabled/template.conf index 8652b41..1190970 100644 --- a/templates/etc/apache2/sites-enabled/template.conf +++ b/templates/etc/apache2/sites-enabled/template.conf @@ -1,9 +1,9 @@ {{ ansible_managed | comment }} {% for ip in ansible_all_ipv4_addresses %} -Listen {{ ip }}:{{ item.port }} +Listen {{ ip }}:{{ item.port_public }} - + ProxyPreserveHost On @@ -16,4 +16,4 @@ Listen {{ ip }}:{{ item.port }} -{% endfor %} \ No newline at end of file +{% endfor %} diff --git a/templates/etc/nginx/sites-enabled/template.conf b/templates/etc/nginx/sites-enabled/template.conf index 088b791..2e8c371 100644 --- a/templates/etc/nginx/sites-enabled/template.conf +++ b/templates/etc/nginx/sites-enabled/template.conf @@ -2,7 +2,7 @@ server { {% for ip in ansible_all_ipv4_addresses %} - listen {{ ip }}:{{ item.port }}{% if nginx_prometheus_tls_certificate_path is defined %} ssl http2{% endif %}; + listen {{ ip }}:{{ item.port_public }}{% if nginx_prometheus_tls_certificate_path is defined %} ssl http2{% endif %}; {% endfor %} ## We use "_" as a dirty trick to achieve catch-all behavior. See http://nginx.org/en/docs/http/server_names.html