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

21 lines
636 B
Plaintext
Raw Normal View History

2020-02-11 04:25:42 -06:00
# 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
2020-02-11 04:25:42 -06:00
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>