Saltstack Official Apache Formula
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.

214 lines
9.9KB

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