ansible/roles/redirect/templates/apache2-redirect.conf

21 lines
636 B
ApacheConf

# Configuration for {{ redirect_from }}
# Redirect to {{ redirect_to }}
# vim:ft=apache:
# Accept connections from non-SNI clients
SSLStrictSNIVHostCheck off
# Website configuration
<VirtualHost *:80>
ServerName {{ redirect_from }}
Redirect permanent / https://{{ redirect_to }}/
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/pki/cert/crt/{{ redirect_from }}.crt
SSLCertificateKeyFile /etc/pki/cert/private/{{ redirect_from }}.key
SSLCertificateChainFile /etc/pki/cert/crt/{{ redirect_from}}-fullchain.crt
ServerName {{ redirect_from }}
Redirect permanent / https://{{ redirect_to }}/
</VirtualHost>