summaryrefslogtreecommitdiff
path: root/apache2/conf-available/local-ssl.conf
blob: 4b4a8ecce98f8fa0fde3f9f200db983244e2307a (plain)
  1. <IfDefine !_TLSHOST>
  2. <IfDefine _HOST>
  3. Define _TLSHOST ${_HOST}
  4. </IfDefine>
  5. </IfDefine>
  6. <IfDefine !_TLS_KEY>
  7. <IfDefine _TLSHOST>
  8. Define _TLS_CERT_CHAIN /var/lib/dehydrated/certs/${_TLSHOST}/fullchain.pem
  9. Define _TLS_KEY /var/lib/dehydrated/certs/${_TLSHOST}/privkey.pem
  10. </IfDefine>
  11. </IfDefine>
  12. <If "%{HTTPS} == 'off'">
  13. RedirectMatch permanent ^(?!/.well-known/)(.*) https://${_HOST}/$1
  14. </If>
  15. SSLEngine on
  16. <IfDefine _TLS_KEY>
  17. SSLCertificateFile ${_TLS_CERT_CHAIN}
  18. SSLCertificateKeyFile ${_TLS_KEY}
  19. </IfDefine>
  20. SSLCACertificatePath /etc/ssl/certs/
  21. #SSLCARevocationPath /etc/apache2/ssl.crl/
  22. #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
  23. #SSLVerifyClient require
  24. #SSLVerifyDepth 10
  25. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  26. <FilesMatch "\.(cgi|shtml|phtml|php)$">
  27. SSLOptions +StdEnvVars
  28. </FilesMatch>
  29. <Directory /usr/lib/cgi-bin>
  30. SSLOptions +StdEnvVars
  31. </Directory>
  32. BrowserMatch "MSIE [2-6]" \
  33. nokeepalive ssl-unclean-shutdown \
  34. downgrade-1.0 force-response-1.0
  35. # MSIE 7 and newer should be able to use keepalive
  36. BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
  37. #CustomLog /var/log/apache2/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"