|
|
008793 |
#
|
|
|
008793 |
# When we also provide SSL we have to listen to the
|
|
|
008793 |
# the HTTPS port in addition.
|
|
|
008793 |
#
|
|
|
008793 |
Listen 443 https
|
|
|
008793 |
|
|
|
008793 |
##
|
|
|
008793 |
## SSL Global Context
|
|
|
008793 |
##
|
|
|
008793 |
## All SSL configuration in this context applies both to
|
|
|
008793 |
## the main server and all SSL-enabled virtual hosts.
|
|
|
008793 |
##
|
|
|
008793 |
|
|
|
008793 |
# Pass Phrase Dialog:
|
|
|
008793 |
# Configure the pass phrase gathering process.
|
|
|
008793 |
# The filtering dialog program (`builtin' is a internal
|
|
|
008793 |
# terminal dialog) has to provide the pass phrase on stdout.
|
|
|
008793 |
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
|
|
|
008793 |
|
|
|
008793 |
# Inter-Process Session Cache:
|
|
|
008793 |
# Configure the SSL Session Cache: First the mechanism
|
|
|
008793 |
# to use and second the expiring timeout (in seconds).
|
|
|
008793 |
SSLSessionCache shmcb:/run/httpd/sslcache(512000)
|
|
|
008793 |
SSLSessionCacheTimeout 300
|
|
|
008793 |
|
|
|
008793 |
# Pseudo Random Number Generator (PRNG):
|
|
|
008793 |
# Configure one or more sources to seed the PRNG of the
|
|
|
008793 |
# SSL library. The seed data should be of good random quality.
|
|
|
008793 |
# WARNING! On some platforms /dev/random blocks if not enough entropy
|
|
|
008793 |
# is available. This means you then cannot use the /dev/random device
|
|
|
008793 |
# because it would lead to very long connection times (as long as
|
|
|
008793 |
# it requires to make more entropy available). But usually those
|
|
|
008793 |
# platforms additionally provide a /dev/urandom device which doesn't
|
|
|
008793 |
# block. So, if available, use this one instead. Read the mod_ssl User
|
|
|
008793 |
# Manual for more details.
|
|
|
008793 |
SSLRandomSeed startup file:/dev/urandom 256
|
|
|
008793 |
SSLRandomSeed connect builtin
|
|
|
008793 |
#SSLRandomSeed startup file:/dev/random 512
|
|
|
008793 |
#SSLRandomSeed connect file:/dev/random 512
|
|
|
008793 |
#SSLRandomSeed connect file:/dev/urandom 512
|
|
|
008793 |
|
|
|
008793 |
#
|
|
|
008793 |
# Use "SSLCryptoDevice" to enable any supported hardware
|
|
|
008793 |
# accelerators. Use "openssl engine -v" to list supported
|
|
|
008793 |
# engine names. NOTE: If you enable an accelerator and the
|
|
|
008793 |
# server does not start, consult the error logs and ensure
|
|
|
008793 |
# your accelerator is functioning properly.
|
|
|
008793 |
#
|
|
|
008793 |
SSLCryptoDevice builtin
|
|
|
008793 |
#SSLCryptoDevice ubsec
|
|
|
008793 |
|
|
|
008793 |
##
|
|
|
008793 |
## SSL Virtual Host Context
|
|
|
008793 |
##
|
|
|
008793 |
|
|
|
008793 |
<VirtualHost _default_:443>
|
|
|
008793 |
|
|
|
008793 |
# General setup for the virtual host, inherited from global configuration
|
|
|
008793 |
#DocumentRoot "/var/www/html"
|
|
|
008793 |
#ServerName www.example.com:443
|
|
|
008793 |
|
|
|
008793 |
# Use separate log files for the SSL virtual host; note that LogLevel
|
|
|
008793 |
# is not inherited from httpd.conf.
|
|
|
008793 |
ErrorLog logs/ssl_error_log
|
|
|
008793 |
TransferLog logs/ssl_access_log
|
|
|
008793 |
LogLevel warn
|
|
|
008793 |
|
|
|
008793 |
# SSL Engine Switch:
|
|
|
008793 |
# Enable/Disable SSL for this virtual host.
|
|
|
008793 |
SSLEngine on
|
|
|
008793 |
|
|
|
008793 |
# SSL Protocol support:
|
|
|
008793 |
# List the enable protocol levels with which clients will be able to
|
|
|
008793 |
# connect. Disable SSLv2 access by default:
|
|
|
008793 |
SSLProtocol all -SSLv2 -SSLv3
|
|
|
008793 |
|
|
|
008793 |
# SSL Cipher Suite:
|
|
|
008793 |
# List the ciphers that the client is permitted to negotiate.
|
|
|
008793 |
# See the mod_ssl documentation for a complete list.
|
|
|
008793 |
SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA
|
|
|
008793 |
|
|
|
008793 |
# Speed-optimized SSL Cipher configuration:
|
|
|
008793 |
# If speed is your main concern (on busy HTTPS servers e.g.),
|
|
|
008793 |
# you might want to force clients to specific, performance
|
|
|
008793 |
# optimized ciphers. In this case, prepend those ciphers
|
|
|
008793 |
# to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
|
|
|
008793 |
# Caveat: by giving precedence to RC4-SHA and AES128-SHA
|
|
|
008793 |
# (as in the example below), most connections will no longer
|
|
|
008793 |
# have perfect forward secrecy - if the server's key is
|
|
|
008793 |
# compromised, captures of past or future traffic must be
|
|
|
008793 |
# considered compromised, too.
|
|
|
008793 |
#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
|
|
|
008793 |
#SSLHonorCipherOrder on
|
|
|
008793 |
|
|
|
008793 |
# Server Certificate:
|
|
|
008793 |
# Point SSLCertificateFile at a PEM encoded certificate. If
|
|
|
008793 |
# the certificate is encrypted, then you will be prompted for a
|
|
|
008793 |
# pass phrase. Note that a kill -HUP will prompt again. A new
|
|
|
008793 |
# certificate can be generated using the genkey(1) command.
|
|
|
008793 |
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
|
|
|
008793 |
|
|
|
008793 |
# Server Private Key:
|
|
|
008793 |
# If the key is not combined with the certificate, use this
|
|
|
008793 |
# directive to point at the key file. Keep in mind that if
|
|
|
008793 |
# you've both a RSA and a DSA private key you can configure
|
|
|
008793 |
# both in parallel (to also allow the use of DSA ciphers, etc.)
|
|
|
008793 |
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
|
|
|
008793 |
|
|
|
008793 |
# Server Certificate Chain:
|
|
|
008793 |
# Point SSLCertificateChainFile at a file containing the
|
|
|
008793 |
# concatenation of PEM encoded CA certificates which form the
|
|
|
008793 |
# certificate chain for the server certificate. Alternatively
|
|
|
008793 |
# the referenced file can be the same as SSLCertificateFile
|
|
|
008793 |
# when the CA certificates are directly appended to the server
|
|
|
008793 |
# certificate for convinience.
|
|
|
008793 |
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
|
|
|
008793 |
|
|
|
008793 |
# Certificate Authority (CA):
|
|
|
008793 |
# Set the CA certificate verification path where to find CA
|
|
|
008793 |
# certificates for client authentication or alternatively one
|
|
|
008793 |
# huge file containing all of them (file must be PEM encoded)
|
|
|
008793 |
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
|
|
|
008793 |
|
|
|
008793 |
# Client Authentication (Type):
|
|
|
008793 |
# Client certificate verification type and depth. Types are
|
|
|
008793 |
# none, optional, require and optional_no_ca. Depth is a
|
|
|
008793 |
# number which specifies how deeply to verify the certificate
|
|
|
008793 |
# issuer chain before deciding the certificate is not valid.
|
|
|
008793 |
#SSLVerifyClient require
|
|
|
008793 |
#SSLVerifyDepth 10
|
|
|
008793 |
|
|
|
008793 |
# Access Control:
|
|
|
008793 |
# With SSLRequire you can do per-directory access control based
|
|
|
008793 |
# on arbitrary complex boolean expressions containing server
|
|
|
008793 |
# variable checks and other lookup directives. The syntax is a
|
|
|
008793 |
# mixture between C and Perl. See the mod_ssl documentation
|
|
|
008793 |
# for more details.
|
|
|
008793 |
#<Location />
|
|
|
008793 |
#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
|
|
|
008793 |
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
|
|
|
008793 |
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
|
|
|
008793 |
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
|
|
|
008793 |
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
|
|
|
008793 |
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
|
|
|
008793 |
#</Location>
|
|
|
008793 |
|
|
|
008793 |
# SSL Engine Options:
|
|
|
008793 |
# Set various options for the SSL engine.
|
|
|
008793 |
# o FakeBasicAuth:
|
|
|
008793 |
# Translate the client X.509 into a Basic Authorisation. This means that
|
|
|
008793 |
# the standard Auth/DBMAuth methods can be used for access control. The
|
|
|
008793 |
# user name is the `one line' version of the client's X.509 certificate.
|
|
|
008793 |
# Note that no password is obtained from the user. Every entry in the user
|
|
|
008793 |
# file needs this password: `xxj31ZMTZzkVA'.
|
|
|
008793 |
# o ExportCertData:
|
|
|
008793 |
# This exports two additional environment variables: SSL_CLIENT_CERT and
|
|
|
008793 |
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
|
|
|
008793 |
# server (always existing) and the client (only existing when client
|
|
|
008793 |
# authentication is used). This can be used to import the certificates
|
|
|
008793 |
# into CGI scripts.
|
|
|
008793 |
# o StdEnvVars:
|
|
|
008793 |
# This exports the standard SSL/TLS related `SSL_*' environment variables.
|
|
|
008793 |
# Per default this exportation is switched off for performance reasons,
|
|
|
008793 |
# because the extraction step is an expensive operation and is usually
|
|
|
008793 |
# useless for serving static content. So one usually enables the
|
|
|
008793 |
# exportation for CGI and SSI requests only.
|
|
|
008793 |
# o StrictRequire:
|
|
|
008793 |
# This denies access when "SSLRequireSSL" or "SSLRequire" applied even
|
|
|
008793 |
# under a "Satisfy any" situation, i.e. when it applies access is denied
|
|
|
008793 |
# and no other module can change it.
|
|
|
008793 |
# o OptRenegotiate:
|
|
|
008793 |
# This enables optimized SSL connection renegotiation handling when SSL
|
|
|
008793 |
# directives are used in per-directory context.
|
|
|
008793 |
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
|
|
|
008793 |
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
|
|
|
008793 |
SSLOptions +StdEnvVars
|
|
|
008793 |
</Files>
|
|
|
008793 |
<Directory "/var/www/cgi-bin">
|
|
|
008793 |
SSLOptions +StdEnvVars
|
|
|
008793 |
</Directory>
|
|
|
008793 |
|
|
|
008793 |
# SSL Protocol Adjustments:
|
|
|
008793 |
# The safe and default but still SSL/TLS standard compliant shutdown
|
|
|
008793 |
# approach is that mod_ssl sends the close notify alert but doesn't wait for
|
|
|
008793 |
# the close notify alert from client. When you need a different shutdown
|
|
|
008793 |
# approach you can use one of the following variables:
|
|
|
008793 |
# o ssl-unclean-shutdown:
|
|
|
008793 |
# This forces an unclean shutdown when the connection is closed, i.e. no
|
|
|
008793 |
# SSL close notify alert is send or allowed to received. This violates
|
|
|
008793 |
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
|
|
|
008793 |
# this when you receive I/O errors because of the standard approach where
|
|
|
008793 |
# mod_ssl sends the close notify alert.
|
|
|
008793 |
# o ssl-accurate-shutdown:
|
|
|
008793 |
# This forces an accurate shutdown when the connection is closed, i.e. a
|
|
|
008793 |
# SSL close notify alert is send and mod_ssl waits for the close notify
|
|
|
008793 |
# alert of the client. This is 100% SSL/TLS standard compliant, but in
|
|
|
008793 |
# practice often causes hanging connections with brain-dead browsers. Use
|
|
|
008793 |
# this only for browsers where you know that their SSL implementation
|
|
|
008793 |
# works correctly.
|
|
|
008793 |
# Notice: Most problems of broken clients are also related to the HTTP
|
|
|
008793 |
# keep-alive facility, so you usually additionally want to disable
|
|
|
008793 |
# keep-alive for those clients, too. Use variable "nokeepalive" for this.
|
|
|
008793 |
# Similarly, one has to force some clients to use HTTP/1.0 to workaround
|
|
|
008793 |
# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
|
|
|
008793 |
# "force-response-1.0" for this.
|
|
|
008793 |
BrowserMatch "MSIE [2-5]" \
|
|
|
008793 |
nokeepalive ssl-unclean-shutdown \
|
|
|
008793 |
downgrade-1.0 force-response-1.0
|
|
|
008793 |
|
|
|
008793 |
# Per-Server Logging:
|
|
|
008793 |
# The home of a custom SSL log file. Use this when you want a
|
|
|
008793 |
# compact non-error SSL logfile on a virtual host basis.
|
|
|
008793 |
CustomLog logs/ssl_request_log \
|
|
|
008793 |
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
|
|
|
008793 |
|
|
|
008793 |
</VirtualHost>
|
|
|
008793 |
|