common/templates/apache/origin.conf
2020-01-22 23:54:58 +05:00

30 lines
671 B
Text

NameVirtualHost *:80
<VirtualHost *:80>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName {{ item.domain }}
Redirect permanent / https://{{ item.domain }}
</VirtualHost>
<VirtualHost _default_:443>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerName {{ item.domain }}
DocumentRoot {{ item.root }}
RewriteEngine on
SSLEngine on
SSLCertificateFile {{ item.cert }}
SSLCertificateKeyFile {{ item.key }}
SSLCertificateChainFile {{ item.chain }}
{% for rewrite in item.rewrites %}
RewriteRule {{ rewrite }}
{% endfor %}
</VirtualHost>