add ipv6 to nginx
This commit is contained in:
@@ -65,11 +65,13 @@ stream {
|
||||
# The default http ports
|
||||
{% for port in defaults.listen_ports %}
|
||||
listen {{ ansible_default_ipv4.address }}:{{ port }};
|
||||
listen [{{ ansible_default_ipv6.address }}]:{{ port }};
|
||||
{% endfor %}
|
||||
|
||||
# Any unique ports listed in the extra_ports field
|
||||
{% for port in unique_ports %}
|
||||
listen {{ ansible_default_ipv4.address }}:{{ port }};
|
||||
listen [{{ ansible_default_ipv6.address }}]:{{ port }};
|
||||
{% endfor %}
|
||||
|
||||
proxy_pass $map_forward_ip:$upstream_port;
|
||||
|
||||
Reference in New Issue
Block a user