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