Skip to content

Commit 2ab836d

Browse files
authored
Merge pull request #10 from hbarza/fix-proxy-port-mapping-public-internal
fix: set proxy server templates to listen to defined public port
2 parents 833b136 + d19a0c9 commit 2ab836d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/etc/apache2/sites-enabled/template.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{{ ansible_managed | comment }}
22

33
{% for ip in ansible_all_ipv4_addresses %}
4-
Listen {{ ip }}:{{ item.port }}
4+
Listen {{ ip }}:{{ item.port_public }}
55

6-
<VirtualHost {{ ip }}:{{ item.port }}>
6+
<VirtualHost {{ ip }}:{{ item.port_public }}>
77
ProxyPreserveHost On
88

99
<Location "/">
@@ -16,4 +16,4 @@ Listen {{ ip }}:{{ item.port }}
1616
</Location>
1717

1818
</VirtualHost>
19-
{% endfor %}
19+
{% endfor %}

templates/etc/nginx/sites-enabled/template.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
server {
44
{% for ip in ansible_all_ipv4_addresses %}
5-
listen {{ ip }}:{{ item.port }}{% if nginx_prometheus_tls_certificate_path is defined %} ssl http2{% endif %};
5+
listen {{ ip }}:{{ item.port_public }}{% if nginx_prometheus_tls_certificate_path is defined %} ssl http2{% endif %};
66
{% endfor %}
77

88
## We use "_" as a dirty trick to achieve catch-all behavior. See http://nginx.org/en/docs/http/server_names.html

0 commit comments

Comments
 (0)