Blame SOURCES/ssl.conf

59234c
#
59234c
# When we also provide SSL we have to listen to the 
59234c
# standard HTTPS port in addition.
59234c
#
59234c
Listen 443 https
59234c
59234c
##
59234c
##  SSL Global Context
59234c
##
59234c
##  All SSL configuration in this context applies both to
59234c
##  the main server and all SSL-enabled virtual hosts.
59234c
##
59234c
59234c
#   Pass Phrase Dialog:
59234c
#   Configure the pass phrase gathering process.
59234c
#   The filtering dialog program (`builtin' is a internal
59234c
#   terminal dialog) has to provide the pass phrase on stdout.
59234c
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
59234c
59234c
#   Inter-Process Session Cache:
59234c
#   Configure the SSL Session Cache: First the mechanism 
59234c
#   to use and second the expiring timeout (in seconds).
59234c
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)
59234c
SSLSessionCacheTimeout  300
59234c
59234c
#
59234c
# Use "SSLCryptoDevice" to enable any supported hardware
59234c
# accelerators. Use "openssl engine -v" to list supported
59234c
# engine names.  NOTE: If you enable an accelerator and the
59234c
# server does not start, consult the error logs and ensure
59234c
# your accelerator is functioning properly. 
59234c
#
59234c
SSLCryptoDevice builtin
59234c
#SSLCryptoDevice ubsec
59234c
59234c
##
59234c
## SSL Virtual Host Context
59234c
##
59234c
59234c
<VirtualHost _default_:443>
59234c
59234c
# General setup for the virtual host, inherited from global configuration
59234c
#DocumentRoot "/var/www/html"
59234c
#ServerName www.example.com:443
59234c
59234c
# Use separate log files for the SSL virtual host; note that LogLevel
59234c
# is not inherited from httpd.conf.
59234c
ErrorLog logs/ssl_error_log
59234c
TransferLog logs/ssl_access_log
59234c
LogLevel warn
59234c
59234c
#   SSL Engine Switch:
59234c
#   Enable/Disable SSL for this virtual host.
59234c
SSLEngine on
59234c
59234c
#   List the protocol versions which clients are allowed to connect with.
59234c
#   The OpenSSL system profile is used by default.  See
59234c
#   update-crypto-policies(8) for more details.
59234c
#SSLProtocol all -SSLv3
59234c
#SSLProxyProtocol all -SSLv3
59234c
59234c
#   User agents such as web browsers are not configured for the user's
59234c
#   own preference of either security or performance, therefore this
59234c
#   must be the prerogative of the web server administrator who manages
59234c
#   cpu load versus confidentiality, so enforce the server's cipher order.
59234c
SSLHonorCipherOrder on
59234c
59234c
#   SSL Cipher Suite:
59234c
#   List the ciphers that the client is permitted to negotiate.
59234c
#   See the mod_ssl documentation for a complete list.
59234c
#   The OpenSSL system profile is configured by default.  See
59234c
#   update-crypto-policies(8) for more details.
59234c
SSLCipherSuite PROFILE=SYSTEM
59234c
SSLProxyCipherSuite PROFILE=SYSTEM
59234c
59234c
#   Point SSLCertificateFile at a PEM encoded certificate.  If
59234c
#   the certificate is encrypted, then you will be prompted for a
59234c
#   pass phrase.  Note that restarting httpd will prompt again.  Keep
59234c
#   in mind that if you have both an RSA and a DSA certificate you
59234c
#   can configure both in parallel (to also allow the use of DSA
59234c
#   ciphers, etc.)
59234c
#   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
59234c
#   require an ECC certificate which can also be configured in
59234c
#   parallel.
59234c
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
59234c
59234c
#   Server Private Key:
59234c
#   If the key is not combined with the certificate, use this
59234c
#   directive to point at the key file.  Keep in mind that if
59234c
#   you've both a RSA and a DSA private key you can configure
59234c
#   both in parallel (to also allow the use of DSA ciphers, etc.)
59234c
#   ECC keys, when in use, can also be configured in parallel
59234c
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
59234c
59234c
#   Server Certificate Chain:
59234c
#   Point SSLCertificateChainFile at a file containing the
59234c
#   concatenation of PEM encoded CA certificates which form the
59234c
#   certificate chain for the server certificate. Alternatively
59234c
#   the referenced file can be the same as SSLCertificateFile
59234c
#   when the CA certificates are directly appended to the server
59234c
#   certificate for convenience.
59234c
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
59234c
59234c
#   Certificate Authority (CA):
59234c
#   Set the CA certificate verification path where to find CA
59234c
#   certificates for client authentication or alternatively one
59234c
#   huge file containing all of them (file must be PEM encoded)
59234c
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
59234c
59234c
#   Client Authentication (Type):
59234c
#   Client certificate verification type and depth.  Types are
59234c
#   none, optional, require and optional_no_ca.  Depth is a
59234c
#   number which specifies how deeply to verify the certificate
59234c
#   issuer chain before deciding the certificate is not valid.
59234c
#SSLVerifyClient require
59234c
#SSLVerifyDepth  10
59234c
59234c
#   Access Control:
59234c
#   With SSLRequire you can do per-directory access control based
59234c
#   on arbitrary complex boolean expressions containing server
59234c
#   variable checks and other lookup directives.  The syntax is a
59234c
#   mixture between C and Perl.  See the mod_ssl documentation
59234c
#   for more details.
59234c
#<Location />
59234c
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
59234c
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
59234c
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
59234c
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
59234c
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
59234c
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
59234c
#</Location>
59234c
59234c
#   SSL Engine Options:
59234c
#   Set various options for the SSL engine.
59234c
#   o FakeBasicAuth:
59234c
#     Translate the client X.509 into a Basic Authorisation.  This means that
59234c
#     the standard Auth/DBMAuth methods can be used for access control.  The
59234c
#     user name is the `one line' version of the client's X.509 certificate.
59234c
#     Note that no password is obtained from the user. Every entry in the user
59234c
#     file needs this password: `xxj31ZMTZzkVA'.
59234c
#   o ExportCertData:
59234c
#     This exports two additional environment variables: SSL_CLIENT_CERT and
59234c
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
59234c
#     server (always existing) and the client (only existing when client
59234c
#     authentication is used). This can be used to import the certificates
59234c
#     into CGI scripts.
59234c
#   o StdEnvVars:
59234c
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
59234c
#     Per default this exportation is switched off for performance reasons,
59234c
#     because the extraction step is an expensive operation and is usually
59234c
#     useless for serving static content. So one usually enables the
59234c
#     exportation for CGI and SSI requests only.
59234c
#   o StrictRequire:
59234c
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
59234c
#     under a "Satisfy any" situation, i.e. when it applies access is denied
59234c
#     and no other module can change it.
59234c
#   o OptRenegotiate:
59234c
#     This enables optimized SSL connection renegotiation handling when SSL
59234c
#     directives are used in per-directory context. 
59234c
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
59234c
<FilesMatch "\.(cgi|shtml|phtml|php)$">
59234c
    SSLOptions +StdEnvVars
59234c
</FilesMatch>
59234c
<Directory "/var/www/cgi-bin">
59234c
    SSLOptions +StdEnvVars
59234c
</Directory>
59234c
59234c
#   SSL Protocol Adjustments:
59234c
#   The safe and default but still SSL/TLS standard compliant shutdown
59234c
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
59234c
#   the close notify alert from client. When you need a different shutdown
59234c
#   approach you can use one of the following variables:
59234c
#   o ssl-unclean-shutdown:
59234c
#     This forces an unclean shutdown when the connection is closed, i.e. no
59234c
#     SSL close notify alert is sent or allowed to be received.  This violates
59234c
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
59234c
#     this when you receive I/O errors because of the standard approach where
59234c
#     mod_ssl sends the close notify alert.
59234c
#   o ssl-accurate-shutdown:
59234c
#     This forces an accurate shutdown when the connection is closed, i.e. a
59234c
#     SSL close notify alert is sent and mod_ssl waits for the close notify
59234c
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
59234c
#     practice often causes hanging connections with brain-dead browsers. Use
59234c
#     this only for browsers where you know that their SSL implementation
59234c
#     works correctly. 
59234c
#   Notice: Most problems of broken clients are also related to the HTTP
59234c
#   keep-alive facility, so you usually additionally want to disable
59234c
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
59234c
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
59234c
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
59234c
#   "force-response-1.0" for this.
59234c
BrowserMatch "MSIE [2-5]" \
59234c
         nokeepalive ssl-unclean-shutdown \
59234c
         downgrade-1.0 force-response-1.0
59234c
59234c
#   Per-Server Logging:
59234c
#   The home of a custom SSL log file. Use this when you want a
59234c
#   compact non-error SSL logfile on a virtual host basis.
59234c
CustomLog logs/ssl_request_log \
59234c
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
59234c
59234c
</VirtualHost>
59234c