Merge pull request '🐛 Fix Apache templates for missing IPv6' (!62) from fix-apache-ipv6 into master

Reviewed-on: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/62
Reviewed-by: dkdent <dkdent@netz39.de>
This commit is contained in:
Stefan Haun 2022-08-05 08:26:59 +00:00
commit 6762a7b644
2 changed files with 16 additions and 0 deletions

View file

@ -1,4 +1,8 @@
{% if 'address' in ansible_default_ipv6 %}
<VirtualHost {{ ansible_default_ipv4.address }}:80 [{{ ansible_default_ipv6.address }}]:80> <VirtualHost {{ ansible_default_ipv4.address }}:80 [{{ ansible_default_ipv6.address }}]:80>
{% else %}
<VirtualHost {{ ansible_default_ipv4.address }}:80>
{% endif %}
ServerAdmin {{ server_admin }} ServerAdmin {{ server_admin }}
ServerName {{ site_name }} ServerName {{ site_name }}
ServerAlias {{ site_name }} ServerAlias {{ site_name }}
@ -15,7 +19,11 @@
</VirtualHost> </VirtualHost>
<IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}> <IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}>
{% if 'address' in ansible_default_ipv6 %}
<VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address }}]:443> <VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address }}]:443>
{% else %}
<VirtualHost {{ ansible_default_ipv4.address }}:443>
{% endif %}
ServerAdmin {{ server_admin }} ServerAdmin {{ server_admin }}
ServerName {{ site_name }} ServerName {{ site_name }}
ServerAlias {{ site_name }} ServerAlias {{ site_name }}

View file

@ -1,4 +1,8 @@
{% if 'address' in ansible_default_ipv6 %}
<VirtualHost {{ ansible_default_ipv4.address }}:80 [{{ ansible_default_ipv6.address }}]:80> <VirtualHost {{ ansible_default_ipv4.address }}:80 [{{ ansible_default_ipv6.address }}]:80>
{% else %}
<VirtualHost {{ ansible_default_ipv4.address }}:80>
{% endif %}
ServerAdmin {{ server_admin }} ServerAdmin {{ server_admin }}
ServerName {{ site_name }} ServerName {{ site_name }}
ServerAlias {{ site_name }} ServerAlias {{ site_name }}
@ -17,7 +21,11 @@
<IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}/cert.pem> <IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}/cert.pem>
<IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}/privkey.pem> <IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}/privkey.pem>
<IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}/chain.pem> <IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}/chain.pem>
{% if 'address' in ansible_default_ipv6 %}
<VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address }}]:443> <VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address }}]:443>
{% else %}
<VirtualHost {{ ansible_default_ipv4.address }}:443>
{% endif %}
ServerAdmin {{ server_admin }} ServerAdmin {{ server_admin }}
ServerName {{ site_name }} ServerName {{ site_name }}
ServerAlias {{ site_name }} ServerAlias {{ site_name }}