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.
 
 
 
 
 
 

139 lines
6.4 KiB

  1. <IfModule mod_ssl.c>
  2. <VirtualHost _default_:443>
  3. ServerAdmin {{ ispmail_postmaster_address }}
  4. ServerName {{ ispmail_webmail_hostname }}
  5. # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  6. # error, crit, alert, emerg.
  7. # It is also possible to configure the loglevel for particular
  8. # modules, e.g.
  9. #LogLevel info ssl:warn
  10. RedirectMatch permanent ^/$ https://{{ ispmail_webmail_hostname}}/horde/
  11. ErrorLog ${APACHE_LOG_DIR}/webmail.error.log
  12. CustomLog ${APACHE_LOG_DIR}/webmail.access.log combined
  13. # For most configuration files from conf-available/, which are
  14. # enabled or disabled at a global level, it is possible to
  15. # include a line for only one particular virtual host. For example the
  16. # following line enables the CGI configuration for this host only
  17. # after it has been globally disabled with "a2disconf".
  18. #Include conf-available/serve-cgi-bin.conf
  19. # SSL Engine Switch:
  20. # Enable/Disable SSL for this virtual host.
  21. SSLEngine on
  22. # A self-signed (snakeoil) certificate can be created by installing
  23. # the ssl-cert package. See
  24. # /usr/share/doc/apache2/README.Debian.gz for more info.
  25. # If both key and certificate are stored in the same file, only the
  26. # SSLCertificateFile directive is needed.
  27. SSLCertificateFile /etc/ssl/certs/mailserver.pem
  28. SSLCertificateKeyFile /etc/ssl/private/mailserver.pem
  29. # Server Certificate Chain:
  30. # Point SSLCertificateChainFile at a file containing the
  31. # concatenation of PEM encoded CA certificates which form the
  32. # certificate chain for the server certificate. Alternatively
  33. # the referenced file can be the same as SSLCertificateFile
  34. # when the CA certificates are directly appended to the server
  35. # certificate for convinience.
  36. #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
  37. # Certificate Authority (CA):
  38. # Set the CA certificate verification path where to find CA
  39. # certificates for client authentication or alternatively one
  40. # huge file containing all of them (file must be PEM encoded)
  41. # Note: Inside SSLCACertificatePath you need hash symlinks
  42. # to point to the certificate files. Use the provided
  43. # Makefile to update the hash symlinks after changes.
  44. #SSLCACertificatePath /etc/ssl/certs/
  45. #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
  46. # Certificate Revocation Lists (CRL):
  47. # Set the CA revocation path where to find CA CRLs for client
  48. # authentication or alternatively one huge file containing all
  49. # of them (file must be PEM encoded)
  50. # Note: Inside SSLCARevocationPath you need hash symlinks
  51. # to point to the certificate files. Use the provided
  52. # Makefile to update the hash symlinks after changes.
  53. #SSLCARevocationPath /etc/apache2/ssl.crl/
  54. #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
  55. # Client Authentication (Type):
  56. # Client certificate verification type and depth. Types are
  57. # none, optional, require and optional_no_ca. Depth is a
  58. # number which specifies how deeply to verify the certificate
  59. # issuer chain before deciding the certificate is not valid.
  60. #SSLVerifyClient require
  61. #SSLVerifyDepth 10
  62. # SSL Engine Options:
  63. # Set various options for the SSL engine.
  64. # o FakeBasicAuth:
  65. # Translate the client X.509 into a Basic Authorisation. This means that
  66. # the standard Auth/DBMAuth methods can be used for access control. The
  67. # user name is the `one line' version of the client's X.509 certificate.
  68. # Note that no password is obtained from the user. Every entry in the user
  69. # file needs this password: `xxj31ZMTZzkVA'.
  70. # o ExportCertData:
  71. # This exports two additional environment variables: SSL_CLIENT_CERT and
  72. # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  73. # server (always existing) and the client (only existing when client
  74. # authentication is used). This can be used to import the certificates
  75. # into CGI scripts.
  76. # o StdEnvVars:
  77. # This exports the standard SSL/TLS related `SSL_*' environment variables.
  78. # Per default this exportation is switched off for performance reasons,
  79. # because the extraction step is an expensive operation and is usually
  80. # useless for serving static content. So one usually enables the
  81. # exportation for CGI and SSI requests only.
  82. # o OptRenegotiate:
  83. # This enables optimized SSL connection renegotiation handling when SSL
  84. # directives are used in per-directory context.
  85. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  86. <FilesMatch "\.(cgi|shtml|phtml|php)$">
  87. SSLOptions +StdEnvVars
  88. </FilesMatch>
  89. <Directory /usr/lib/cgi-bin>
  90. SSLOptions +StdEnvVars
  91. </Directory>
  92. # SSL Protocol Adjustments:
  93. # The safe and default but still SSL/TLS standard compliant shutdown
  94. # approach is that mod_ssl sends the close notify alert but doesn't wait for
  95. # the close notify alert from client. When you need a different shutdown
  96. # approach you can use one of the following variables:
  97. # o ssl-unclean-shutdown:
  98. # This forces an unclean shutdown when the connection is closed, i.e. no
  99. # SSL close notify alert is send or allowed to received. This violates
  100. # the SSL/TLS standard but is needed for some brain-dead browsers. Use
  101. # this when you receive I/O errors because of the standard approach where
  102. # mod_ssl sends the close notify alert.
  103. # o ssl-accurate-shutdown:
  104. # This forces an accurate shutdown when the connection is closed, i.e. a
  105. # SSL close notify alert is send and mod_ssl waits for the close notify
  106. # alert of the client. This is 100% SSL/TLS standard compliant, but in
  107. # practice often causes hanging connections with brain-dead browsers. Use
  108. # this only for browsers where you know that their SSL implementation
  109. # works correctly.
  110. # Notice: Most problems of broken clients are also related to the HTTP
  111. # keep-alive facility, so you usually additionally want to disable
  112. # keep-alive for those clients, too. Use variable "nokeepalive" for this.
  113. # Similarly, one has to force some clients to use HTTP/1.0 to workaround
  114. # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  115. # "force-response-1.0" for this.
  116. BrowserMatch "MSIE [2-6]" \
  117. nokeepalive ssl-unclean-shutdown \
  118. downgrade-1.0 force-response-1.0
  119. # MSIE 7 and newer should be able to use keepalive
  120. BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
  121. </VirtualHost>
  122. </IfModule>
  123. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet