2022-09-06 21:00:36 +02:00
|
|
|
{% if 'address' in ansible_default_ipv6 %}
|
|
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:80 [{{ ansible_default_ipv6.address }}]:80>
|
|
|
|
{% else %}
|
|
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:80>
|
|
|
|
{% endif %}
|
2021-03-07 16:31:39 +01:00
|
|
|
ServerAdmin {{ server_admin }}
|
|
|
|
ServerName {{ site_name }}
|
|
|
|
ServerAlias {{ site_name }}
|
|
|
|
ErrorLog /var/log/apache2/{{ site_name }}-error.log
|
|
|
|
CustomLog /var/log/apache2/{{ site_name }}-access.log common
|
|
|
|
|
2021-03-11 22:20:31 +01:00
|
|
|
Alias /.well-known/acme-challenge {{ dehydrated_wellknown_dir }}
|
2021-03-07 16:31:39 +01:00
|
|
|
</VirtualHost>
|
|
|
|
|
2021-03-11 22:24:35 +01:00
|
|
|
<IfFile {{dehydrated_certs_dir}}/{{ site_name }}>
|
2022-09-06 21:00:36 +02:00
|
|
|
{% if 'address' in ansible_default_ipv6 %}
|
|
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address }}]:443>
|
|
|
|
{% else %}
|
|
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:443>
|
|
|
|
{% endif %}
|
2021-03-07 16:31:39 +01:00
|
|
|
ServerAdmin {{ server_admin }}
|
|
|
|
ServerName {{ site_name }}
|
|
|
|
ServerAlias {{ site_name }}
|
|
|
|
|
|
|
|
ErrorLog /var/log/apache2/{{ site_name }}-error.log
|
|
|
|
CustomLog /var/log/apache2/{{ site_name }}-access.log common
|
|
|
|
|
|
|
|
SSLEngine on
|
|
|
|
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
|
2021-03-11 22:24:35 +01:00
|
|
|
SSLCertificateFile {{dehydrated_certs_dir}}/{{ site_name }}/cert.pem
|
|
|
|
SSLCertificateKeyFile {{dehydrated_certs_dir}}/{{ site_name }}/privkey.pem
|
|
|
|
SSLCertificateChainFile {{dehydrated_certs_dir}}/{{ site_name }}/chain.pem
|
2021-03-07 16:31:39 +01:00
|
|
|
|
2021-03-11 22:20:31 +01:00
|
|
|
Alias /.well-known/acme-challenge {{ dehydrated_wellknown_dir }}
|
2021-03-07 16:31:39 +01:00
|
|
|
|
|
|
|
Redirect 404 /
|
|
|
|
</VirtualHost>
|
|
|
|
</IfFile>
|