2 # This is the Apache server configuration file providing SSL support.
3 # It contains the configuration directives to instruct the server how to
4 # serve pages over an https connection. For detailing information about these
5 # directives see <URL:http://httpd.apache.org/docs/2.0/mod/mod_ssl.html>
7 # Do NOT simply read the instructions in here without understanding
8 # what they do. They're here only as hints or reminders. If you are unsure
9 # consult the online docs. You have been warned.
13 # Pseudo Random Number Generator (PRNG):
14 # Configure one or more sources to seed the PRNG of the SSL library.
15 # The seed data should be of good random quality.
16 # WARNING! On some platforms /dev/random blocks if not enough entropy
17 # is available. This means you then cannot use the /dev/random device
18 # because it would lead to very long connection times (as long as
19 # it requires to make more entropy available). But usually those
20 # platforms additionally provide a /dev/urandom device which doesn't
21 # block. So, if available, use this one instead. Read the mod_ssl User
22 # Manual for more details.
24 # Note: This must come before the <IfDefine SSL> container to support
25 # starting without SSL on platforms with no /dev/random equivalent
26 # but a statically compiled-in mod_ssl.
28 SSLRandomSeed startup builtin
29 SSLRandomSeed connect builtin
30 #SSLRandomSeed startup file:/dev/random 512
31 #SSLRandomSeed startup file:/dev/urandom 512
32 #SSLRandomSeed connect file:/dev/random 512
33 #SSLRandomSeed connect file:/dev/urandom 512
38 # When we also provide SSL we have to listen to the
39 # standard HTTP port (see above) and to the HTTPS port
41 # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
42 # Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
49 ## All SSL configuration in this context applies both to
50 ## the main server and all SSL-enabled virtual hosts.
54 # Some MIME-types for downloading Certificates and CRLs
56 AddType application/x-x509-ca-cert .crt
57 AddType application/x-pkcs7-crl .crl
60 # Configure the pass phrase gathering process.
61 # The filtering dialog program (`builtin' is a internal
62 # terminal dialog) has to provide the pass phrase on stdout.
63 SSLPassPhraseDialog builtin
65 # Inter-Process Session Cache:
66 # Configure the SSL Session Cache: First the mechanism
67 # to use and second the expiring timeout (in seconds).
69 #SSLSessionCache shmht:@exp_runtimedir@/ssl_scache(512000)
70 #SSLSessionCache shmcb:@exp_runtimedir@/ssl_scache(512000)
71 SSLSessionCache dbm:@exp_runtimedir@/ssl_scache
72 SSLSessionCacheTimeout 300
75 # Configure the path to the mutual exclusion semaphore the
76 # SSL engine uses internally for inter-process synchronization.
77 SSLMutex file:@exp_runtimedir@/ssl_mutex
80 ## SSL Virtual Host Context
83 <VirtualHost _default_:443>
85 # General setup for the virtual host
86 DocumentRoot "@exp_htdocsdir@"
87 ServerName www.example.com:443
88 ServerAdmin you@example.com
89 ErrorLog @exp_logfiledir@/error_log
90 TransferLog @exp_logfiledir@/access_log
93 # Enable/Disable SSL for this virtual host.
97 # List the ciphers that the client is permitted to negotiate.
98 # See the mod_ssl documentation for a complete list.
99 SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
101 # Server Certificate:
102 # Point SSLCertificateFile at a PEM encoded certificate. If
103 # the certificate is encrypted, then you will be prompted for a
104 # pass phrase. Note that a kill -HUP will prompt again. Keep
105 # in mind that if you have both an RSA and a DSA certificate you
106 # can configure both in parallel (to also allow the use of DSA
108 SSLCertificateFile @exp_sysconfdir@/ssl.crt/server.crt
109 #SSLCertificateFile @exp_sysconfdir@/ssl.crt/server-dsa.crt
111 # Server Private Key:
112 # If the key is not combined with the certificate, use this
113 # directive to point at the key file. Keep in mind that if
114 # you've both a RSA and a DSA private key you can configure
115 # both in parallel (to also allow the use of DSA ciphers, etc.)
116 SSLCertificateKeyFile @exp_sysconfdir@/ssl.key/server.key
117 #SSLCertificateKeyFile @exp_sysconfdir@/ssl.key/server-dsa.key
119 # Server Certificate Chain:
120 # Point SSLCertificateChainFile at a file containing the
121 # concatenation of PEM encoded CA certificates which form the
122 # certificate chain for the server certificate. Alternatively
123 # the referenced file can be the same as SSLCertificateFile
124 # when the CA certificates are directly appended to the server
125 # certificate for convinience.
126 #SSLCertificateChainFile @exp_sysconfdir@/ssl.crt/ca.crt
128 # Certificate Authority (CA):
129 # Set the CA certificate verification path where to find CA
130 # certificates for client authentication or alternatively one
131 # huge file containing all of them (file must be PEM encoded)
132 # Note: Inside SSLCACertificatePath you need hash symlinks
133 # to point to the certificate files. Use the provided
134 # Makefile to update the hash symlinks after changes.
135 #SSLCACertificatePath @exp_sysconfdir@/ssl.crt
136 #SSLCACertificateFile @exp_sysconfdir@/ssl.crt/ca-bundle.crt
138 # Certificate Revocation Lists (CRL):
139 # Set the CA revocation path where to find CA CRLs for client
140 # authentication or alternatively one huge file containing all
141 # of them (file must be PEM encoded)
142 # Note: Inside SSLCARevocationPath you need hash symlinks
143 # to point to the certificate files. Use the provided
144 # Makefile to update the hash symlinks after changes.
145 #SSLCARevocationPath @exp_sysconfdir@/ssl.crl
146 #SSLCARevocationFile @exp_sysconfdir@/ssl.crl/ca-bundle.crl
148 # Client Authentication (Type):
149 # Client certificate verification type and depth. Types are
150 # none, optional, require and optional_no_ca. Depth is a
151 # number which specifies how deeply to verify the certificate
152 # issuer chain before deciding the certificate is not valid.
153 #SSLVerifyClient require
157 # With SSLRequire you can do per-directory access control based
158 # on arbitrary complex boolean expressions containing server
159 # variable checks and other lookup directives. The syntax is a
160 # mixture between C and Perl. See the mod_ssl documentation
163 #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
164 # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
165 # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
166 # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
167 # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
168 # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
171 # SSL Engine Options:
172 # Set various options for the SSL engine.
174 # Translate the client X.509 into a Basic Authorisation. This means that
175 # the standard Auth/DBMAuth methods can be used for access control. The
176 # user name is the `one line' version of the client's X.509 certificate.
177 # Note that no password is obtained from the user. Every entry in the user
178 # file needs this password: `xxj31ZMTZzkVA'.
180 # This exports two additional environment variables: SSL_CLIENT_CERT and
181 # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
182 # server (always existing) and the client (only existing when client
183 # authentication is used). This can be used to import the certificates
186 # This exports the standard SSL/TLS related `SSL_*' environment variables.
187 # Per default this exportation is switched off for performance reasons,
188 # because the extraction step is an expensive operation and is usually
189 # useless for serving static content. So one usually enables the
190 # exportation for CGI and SSI requests only.
192 # This exports obsolete environment variables for backward compatibility
193 # to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
194 # to provide compatibility to existing CGI scripts.
196 # This denies access when "SSLRequireSSL" or "SSLRequire" applied even
197 # under a "Satisfy any" situation, i.e. when it applies access is denied
198 # and no other module can change it.
200 # This enables optimized SSL connection renegotiation handling when SSL
201 # directives are used in per-directory context.
202 #SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
203 <FilesMatch "\.(cgi|shtml|phtml|php3?)$">
204 SSLOptions +StdEnvVars
206 <Directory "@exp_cgidir@">
207 SSLOptions +StdEnvVars
210 # SSL Protocol Adjustments:
211 # The safe and default but still SSL/TLS standard compliant shutdown
212 # approach is that mod_ssl sends the close notify alert but doesn't wait for
213 # the close notify alert from client. When you need a different shutdown
214 # approach you can use one of the following variables:
215 # o ssl-unclean-shutdown:
216 # This forces an unclean shutdown when the connection is closed, i.e. no
217 # SSL close notify alert is send or allowed to received. This violates
218 # the SSL/TLS standard but is needed for some brain-dead browsers. Use
219 # this when you receive I/O errors because of the standard approach where
220 # mod_ssl sends the close notify alert.
221 # o ssl-accurate-shutdown:
222 # This forces an accurate shutdown when the connection is closed, i.e. a
223 # SSL close notify alert is send and mod_ssl waits for the close notify
224 # alert of the client. This is 100% SSL/TLS standard compliant, but in
225 # practice often causes hanging connections with brain-dead browsers. Use
226 # this only for browsers where you know that their SSL implementation
228 # Notice: Most problems of broken clients are also related to the HTTP
229 # keep-alive facility, so you usually additionally want to disable
230 # keep-alive for those clients, too. Use variable "nokeepalive" for this.
231 # Similarly, one has to force some clients to use HTTP/1.0 to workaround
232 # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
233 # "force-response-1.0" for this.
234 SetEnvIf User-Agent ".*MSIE.*" \
235 nokeepalive ssl-unclean-shutdown \
236 downgrade-1.0 force-response-1.0
238 # Per-Server Logging:
239 # The home of a custom SSL log file. Use this when you want a
240 # compact non-error SSL logfile on a virtual host basis.
241 CustomLog @exp_logfiledir@/ssl_request_log \
242 "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"