Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

42 lines
998B

  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. Alias /.well-known/acme-challenge/ /var/www/default/.well-known/acme-challenge/
  26. </VirtualHost>
  27. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet