You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default-vhost.j2 915B

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
123456789101112131415161718192021222324252627282930313233343536373839
  1. {{ ansible_managed | comment }}
  2. <VirtualHost _default_:443>
  3. ServerName localhost
  4. ErrorLog ${APACHE_LOG_DIR}/error.log
  5. CustomLog ${APACHE_LOG_DIR}/access.log combined
  6. DocumentRoot /var/www/default/
  7. <Directory "/var/www/default/">
  8. Options -Indexes
  9. </Directory>
  10. SSLEngine on
  11. SSLCertificateFile "/etc/ssl/certs/ssl-cert-snakeoil.pem"
  12. SSLCertificateKeyFile "/etc/ssl/private/ssl-cert-snakeoil.key"
  13. </VirtualHost>
  14. <VirtualHost _default_:80>
  15. ErrorLog ${APACHE_LOG_DIR}/error.log
  16. CustomLog ${APACHE_LOG_DIR}/access.log combined
  17. DocumentRoot /var/www/default/
  18. <Directory "/var/www/default/">
  19. Options -Indexes
  20. </Directory>
  21. # redirect to https if file could not be found in /var/www/default/
  22. RewriteEngine On
  23. RewriteRule ^\/\.well-known\/acme-challenge\/ - [L]
  24. RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L]
  25. </VirtualHost>
  26. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet