Advertisement
metalllinux

FreeIPA Server /etc/httpd/conf.d/ssl.conf

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