forked from Netz39_Admin/netz39-infra-ansible
30 lines
1.2 KiB
Django/Jinja
30 lines
1.2 KiB
Django/Jinja
<VirtualHost {{ ansible_default_ipv4.address }}:80 [{{ ansible_default_ipv6.address | default('::1') }}]:80>
|
|
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
|
|
|
|
Alias /.well-known/acme-challenge {{ dehydrated_wellknown_dir }}
|
|
</VirtualHost>
|
|
|
|
<IfFile {{dehydrated_certs_dir}}/{{ site_name }}>
|
|
<VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address | default('::1') }}]:80>
|
|
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
|
|
SSLCertificateFile {{dehydrated_certs_dir}}/{{ site_name }}/cert.pem
|
|
SSLCertificateKeyFile {{dehydrated_certs_dir}}/{{ site_name }}/privkey.pem
|
|
SSLCertificateChainFile {{dehydrated_certs_dir}}/{{ site_name }}/chain.pem
|
|
|
|
Alias /.well-known/acme-challenge {{ dehydrated_wellknown_dir }}
|
|
|
|
Redirect 404 /
|
|
</VirtualHost>
|
|
</IfFile>
|