Skip to content

Commit 4c56515

Browse files
committed
Update httpd.conf to bind to IPv4 and/or IPv6 sockets
Enable the use of individual IPv4 and IPv6 sockets when the respective IP is detected and LISTEN_ALL_INTERFACES is not set to true. This allows to correctly bind to both the IPv4 and IPv6 addresses found and not just one of them. Signed-off-by: Marco Chiappero <[email protected]>
1 parent 0fca3cf commit 4c56515

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ironic-config/httpd.conf.j2

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ ServerRoot {{ env.HTTPD_DIR }}
22
{%- if env.LISTEN_ALL_INTERFACES | lower == "true" %}
33
Listen {{ env.HTTP_PORT }}
44
{% else %}
5-
Listen {{ env.IRONIC_URL_HOST }}:{{ env.HTTP_PORT }}
5+
{% if env.ENABLE_IPV4 %}
6+
Listen {{ env.IRONIC_IP }}:{{ env.HTTP_PORT }}
7+
{% endif %}
8+
{% if env.ENABLE_IPV6 %}
9+
Listen [{{ env.IRONIC_IPV6 }}]:{{ env.HTTP_PORT }}
10+
{% endif %}
611
{% endif %}
712
Include /etc/httpd/conf.modules.d/*.conf
813
User apache

0 commit comments

Comments
 (0)