ssl.conf 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. #
  2. # When we also provide SSL we have to listen to the
  3. # the HTTPS port in addition.
  4. #
  5. Listen 443 https
  6. ##
  7. ## SSL Global Context
  8. ##
  9. ## All SSL configuration in this context applies both to
  10. ## the main server and all SSL-enabled virtual hosts.
  11. ##
  12. # Pass Phrase Dialog:
  13. # Configure the pass phrase gathering process.
  14. # The filtering dialog program (`builtin' is a internal
  15. # terminal dialog) has to provide the pass phrase on stdout.
  16. SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
  17. # Inter-Process Session Cache:
  18. # Configure the SSL Session Cache: First the mechanism
  19. # to use and second the expiring timeout (in seconds).
  20. SSLSessionCache shmcb:/run/httpd/sslcache(512000)
  21. SSLSessionCacheTimeout 300
  22. # Pseudo Random Number Generator (PRNG):
  23. # Configure one or more sources to seed the PRNG of the
  24. # SSL library. The seed data should be of good random quality.
  25. # WARNING! On some platforms /dev/random blocks if not enough entropy
  26. # is available. This means you then cannot use the /dev/random device
  27. # because it would lead to very long connection times (as long as
  28. # it requires to make more entropy available). But usually those
  29. # platforms additionally provide a /dev/urandom device which doesn't
  30. # block. So, if available, use this one instead. Read the mod_ssl User
  31. # Manual for more details.
  32. SSLRandomSeed startup file:/dev/urandom 256
  33. SSLRandomSeed connect builtin
  34. #SSLRandomSeed startup file:/dev/random 512
  35. #SSLRandomSeed connect file:/dev/random 512
  36. #SSLRandomSeed connect file:/dev/urandom 512
  37. #
  38. # Use "SSLCryptoDevice" to enable any supported hardware
  39. # accelerators. Use "openssl engine -v" to list supported
  40. # engine names. NOTE: If you enable an accelerator and the
  41. # server does not start, consult the error logs and ensure
  42. # your accelerator is functioning properly.
  43. #
  44. SSLCryptoDevice builtin
  45. #SSLCryptoDevice ubsec
  46. ##
  47. ## SSL Virtual Host Context
  48. ##
  49. #<VirtualHost _default_:443>
  50. #
  51. # General setup for the virtual host, inherited from global configuration
  52. #DocumentRoot "/var/www/html"
  53. #ServerName www.example.com:443
  54. #
  55. # Use separate log files for the SSL virtual host; note that LogLevel
  56. # is not inherited from httpd.conf.
  57. #ErrorLog logs/ssl_error_log
  58. #TransferLog logs/ssl_access_log
  59. #LogLevel warn
  60. #
  61. # SSL Engine Switch:
  62. # Enable/Disable SSL for this virtual host.
  63. #SSLEngine on
  64. #
  65. # SSL Protocol support:
  66. # List the enable protocol levels with which clients will be able to
  67. # connect. Disable SSLv2 access by default:
  68. #SSLProtocol all -SSLv2 -SSLv3
  69. #
  70. # SSL Cipher Suite:
  71. # List the ciphers that the client is permitted to negotiate.
  72. # See the mod_ssl documentation for a complete list.
  73. #SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA
  74. #
  75. # Speed-optimized SSL Cipher configuration:
  76. # If speed is your main concern (on busy HTTPS servers e.g.),
  77. # you might want to force clients to specific, performance
  78. # optimized ciphers. In this case, prepend those ciphers
  79. # to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
  80. # Caveat: by giving precedence to RC4-SHA and AES128-SHA
  81. # (as in the example below), most connections will no longer
  82. # have perfect forward secrecy - if the server's key is
  83. # compromised, captures of past or future traffic must be
  84. # considered compromised, too.
  85. #SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
  86. #SSLHonorCipherOrder on
  87. #
  88. # Server Certificate:
  89. # Point SSLCertificateFile at a PEM encoded certificate. If
  90. # the certificate is encrypted, then you will be prompted for a
  91. # pass phrase. Note that a kill -HUP will prompt again. A new
  92. # certificate can be generated using the genkey(1) command.
  93. #SSLCertificateFile /etc/pki/tls/certs/localhost.crt
  94. #
  95. # Server Private Key:
  96. # If the key is not combined with the certificate, use this
  97. # directive to point at the key file. Keep in mind that if
  98. # you've both a RSA and a DSA private key you can configure
  99. # both in parallel (to also allow the use of DSA ciphers, etc.)
  100. #SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
  101. #
  102. # Server Certificate Chain:
  103. # Point SSLCertificateChainFile at a file containing the
  104. # concatenation of PEM encoded CA certificates which form the
  105. # certificate chain for the server certificate. Alternatively
  106. # the referenced file can be the same as SSLCertificateFile
  107. # when the CA certificates are directly appended to the server
  108. # certificate for convinience.
  109. #SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
  110. #
  111. # Certificate Authority (CA):
  112. # Set the CA certificate verification path where to find CA
  113. # certificates for client authentication or alternatively one
  114. # huge file containing all of them (file must be PEM encoded)
  115. #SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
  116. #
  117. # Client Authentication (Type):
  118. # Client certificate verification type and depth. Types are
  119. # none, optional, require and optional_no_ca. Depth is a
  120. # number which specifies how deeply to verify the certificate
  121. # issuer chain before deciding the certificate is not valid.
  122. #SSLVerifyClient require
  123. #SSLVerifyDepth 10
  124. #
  125. # Access Control:
  126. # With SSLRequire you can do per-directory access control based
  127. # on arbitrary complex boolean expressions containing server
  128. # variable checks and other lookup directives. The syntax is a
  129. # mixture between C and Perl. See the mod_ssl documentation
  130. # for more details.
  131. #<Location />
  132. #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  133. # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
  134. # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
  135. # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
  136. # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
  137. # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  138. #</Location>
  139. #
  140. # SSL Engine Options:
  141. # Set various options for the SSL engine.
  142. # o FakeBasicAuth:
  143. # Translate the client X.509 into a Basic Authorisation. This means that
  144. # the standard Auth/DBMAuth methods can be used for access control. The
  145. # user name is the `one line' version of the client's X.509 certificate.
  146. # Note that no password is obtained from the user. Every entry in the user
  147. # file needs this password: `xxj31ZMTZzkVA'.
  148. # o ExportCertData:
  149. # This exports two additional environment variables: SSL_CLIENT_CERT and
  150. # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  151. # server (always existing) and the client (only existing when client
  152. # authentication is used). This can be used to import the certificates
  153. # into CGI scripts.
  154. # o StdEnvVars:
  155. # This exports the standard SSL/TLS related `SSL_*' environment variables.
  156. # Per default this exportation is switched off for performance reasons,
  157. # because the extraction step is an expensive operation and is usually
  158. # useless for serving static content. So one usually enables the
  159. # exportation for CGI and SSI requests only.
  160. # o StrictRequire:
  161. # This denies access when "SSLRequireSSL" or "SSLRequire" applied even
  162. # under a "Satisfy any" situation, i.e. when it applies access is denied
  163. # and no other module can change it.
  164. # o OptRenegotiate:
  165. # This enables optimized SSL connection renegotiation handling when SSL
  166. # directives are used in per-directory context.
  167. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  168. #<Files ~ "\.(cgi|shtml|phtml|php3?)$">
  169. # SSLOptions +StdEnvVars
  170. #</Files>
  171. #<Directory "/var/www/cgi-bin">
  172. # SSLOptions +StdEnvVars
  173. #</Directory>
  174. #
  175. # SSL Protocol Adjustments:
  176. # The safe and default but still SSL/TLS standard compliant shutdown
  177. # approach is that mod_ssl sends the close notify alert but doesn't wait for
  178. # the close notify alert from client. When you need a different shutdown
  179. # approach you can use one of the following variables:
  180. # o ssl-unclean-shutdown:
  181. # This forces an unclean shutdown when the connection is closed, i.e. no
  182. # SSL close notify alert is send or allowed to received. This violates
  183. # the SSL/TLS standard but is needed for some brain-dead browsers. Use
  184. # this when you receive I/O errors because of the standard approach where
  185. # mod_ssl sends the close notify alert.
  186. # o ssl-accurate-shutdown:
  187. # This forces an accurate shutdown when the connection is closed, i.e. a
  188. # SSL close notify alert is send and mod_ssl waits for the close notify
  189. # alert of the client. This is 100% SSL/TLS standard compliant, but in
  190. # practice often causes hanging connections with brain-dead browsers. Use
  191. # this only for browsers where you know that their SSL implementation
  192. # works correctly.
  193. # Notice: Most problems of broken clients are also related to the HTTP
  194. # keep-alive facility, so you usually additionally want to disable
  195. # keep-alive for those clients, too. Use variable "nokeepalive" for this.
  196. # Similarly, one has to force some clients to use HTTP/1.0 to workaround
  197. # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  198. # "force-response-1.0" for this.
  199. #BrowserMatch "MSIE [2-5]" \
  200. # nokeepalive ssl-unclean-shutdown \
  201. # downgrade-1.0 force-response-1.0
  202. #
  203. # Per-Server Logging:
  204. # The home of a custom SSL log file. Use this when you want a
  205. # compact non-error SSL logfile on a virtual host basis.
  206. #CustomLog logs/ssl_request_log \
  207. # "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  208. #
  209. #</VirtualHost>