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.

35 lines
984B

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