ansible-role-website/templates/apache.conf.j2

16 lines
534 B
Plaintext
Raw Normal View History

2022-11-29 18:09:10 +01:00
<VirtualHost *:80>
ServerName {{ domainname }}
ServerAdmin webmaster@{{ domainname }}
DocumentRoot "{{ docroot }}"
ErrorLog ${APACHE_LOG_DIR}/{{ domainname }}.error.log
CustomLog ${APACHE_LOG_DIR}/{{ domainname }}.access.log combined
#rewrite transparent to https, keep uri
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</VirtualHost>