1 LoadModule ssl_module lib/apache/mod_ssl.so
5 # This is the Apache server configuration file providing SSL support.
6 # It contains the configuration directives to instruct the server how to
7 # serve pages over an https connection. For detailing information about these
8 # directives see <URL:http://httpd.apache.org/docs-2.0/mod/mod_ssl.html>
10 # For the moment, see <URL:http://www.modssl.org/docs/> for this info.
11 # The documents are still being prepared from material donated by the
14 # Do NOT simply read the instructions in here without understanding
15 # what they do. They're here only as hints or reminders. If you are unsure
16 # consult the online docs. You have been warned.
20 # Until documentation is completed, please check http://www.modssl.org/
21 # for additional config examples and module docmentation. Directives
22 # and features of mod_ssl are largely unchanged from the mod_ssl project
26 # When we also provide SSL we have to listen to the
27 # standard HTTP port (see above) and to the HTTPS port
32 # Dynamic Shared Object (DSO) Support
34 # To be able to use the functionality of a module which was built as a DSO you
35 # ErrorLog logs/dummy-host.example.com-error_log
36 # CustomLog logs/dummy-host.example.com-access_log common
41 ## All SSL configuration in this context applies both to
42 ## the main server and all SSL-enabled virtual hosts.
46 # Some MIME-types for downloading Certificates and CRLs
48 AddType application/x-x509-ca-cert .crt
49 AddType application/x-pkcs7-crl .crl
52 # Configure the pass phrase gathering process.
53 # The filtering dialog program (`builtin' is a internal
54 # terminal dialog) has to provide the pass phrase on stdout.
55 SSLPassPhraseDialog builtin
57 # Inter-Process Session Cache:
58 # Configure the SSL Session Cache: First the mechanism
59 # to use and second the expiring timeout (in seconds).
61 #SSLSessionCache shmht:logs/ssl_scache(512000)
62 #SSLSessionCache shmcb:logs/ssl_scache(512000)
63 SSLSessionCache dbm:/var/log/httpd/ssl_scache
64 SSLSessionCacheTimeout 300
67 # Configure the path to the mutual exclusion semaphore the
68 # SSL engine uses internally for inter-process synchronization.
69 SSLMutex file:logs/ssl_mutex
71 # Pseudo Random Number Generator (PRNG):
72 # Configure one or more sources to seed the PRNG of the
73 # SSL library. The seed data should be of good random quality.
74 # WARNING! On some platforms /dev/random blocks if not enough entropy
75 # is available. This means you then cannot use the /dev/random device
76 # because it would lead to very long connection times (as long as
77 # it requires to make more entropy available). But usually those
78 # platforms additionally provide a /dev/urandom device which doesn't
79 # block. So, if available, use this one instead. Read the mod_ssl User
80 # Manual for more details.
81 SSLRandomSeed startup builtin
82 SSLRandomSeed connect builtin
83 #SSLRandomSeed startup file:/dev/random 512
84 #SSLRandomSeed startup file:/dev/urandom 512
85 #SSLRandomSeed connect file:/dev/random 512
86 #SSLRandomSeed connect file:/dev/urandom 512
89 # The home of the dedicated SSL protocol logfile. Errors are
90 # additionally duplicated in the general error log file. Put
91 # this somewhere where it cannot be used for symlink attacks on
92 # a real server (i.e. somewhere where only root can write).
93 # Log levels are (ascending order: higher ones include lower ones):
94 # none, error, warn, info, trace, debug.
95 SSLLog /var/log/httpd/ssl_engine_log
99 ## SSL Virtual Host Context
102 <VirtualHost _default_:443>
104 # General setup for the virtual host
105 DocumentRoot "/home/services/httpd/html"
106 ServerName new.host.name:443
107 ServerAdmin you@your.address
108 ErrorLog /var/log/httpd/error_log
109 TransferLog /var/log/httpd/access_log
112 # Enable/Disable SSL for this virtual host.
116 # List the ciphers that the client is permitted to negotiate.
117 # See the mod_ssl documentation for a complete list.
118 SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
120 # Server Certificate:
121 # Point SSLCertificateFile at a PEM encoded certificate. If
122 # the certificate is encrypted, then you will be prompted for a
123 # pass phrase. Note that a kill -HUP will prompt again. A test
124 # certificate can be generated with `make certificate' under
125 # built time. Keep in mind that if you've both a RSA and a DSA
126 # certificate you can configure both in parallel (to also allow
127 # the use of DSA ciphers, etc.)
128 SSLCertificateFile /etc/httpd/ssl/server.crt
129 #SSLCertificateFile /etc/httpd/ssl/server-dsa.crt
131 # Server Private Key:
132 # If the key is not combined with the certificate, use this
133 # directive to point at the key file. Keep in mind that if
134 # you've both a RSA and a DSA private key you can configure
135 # both in parallel (to also allow the use of DSA ciphers, etc.)
136 SSLCertificateKeyFile /etc/httpd/ssl/server.key
137 #SSLCertificateKeyFile /etc/httpd/ssl/server-dsa.key
139 # Server Certificate Chain:
140 # Point SSLCertificateChainFile at a file containing the
141 # concatenation of PEM encoded CA certificates which form the
142 # certificate chain for the server certificate. Alternatively
143 # the referenced file can be the same as SSLCertificateFile
144 # when the CA certificates are directly appended to the server
145 # certificate for convinience.
146 #SSLCertificateChainFile /etc/httpd/ssl/ca.crt
148 # Certificate Authority (CA):
149 # Set the CA certificate verification path where to find CA
150 # certificates for client authentication or alternatively one
151 # huge file containing all of them (file must be PEM encoded)
152 # Note: Inside SSLCACertificatePath you need hash symlinks
153 # to point to the certificate files. Use the provided
154 # Makefile to update the hash symlinks after changes.
155 #SSLCACertificatePath /etc/httpd/ssl
156 #SSLCACertificateFile /etc/httpd/ssl/ca-bundle.crt
158 # Certificate Revocation Lists (CRL):
159 # Set the CA revocation path where to find CA CRLs for client
160 # authentication or alternatively one huge file containing all
161 # of them (file must be PEM encoded)
162 # Note: Inside SSLCARevocationPath you need hash symlinks
163 # to point to the certificate files. Use the provided
164 # Makefile to update the hash symlinks after changes.
165 #SSLCARevocationPath /etc/httpd/ssl
166 #SSLCARevocationFile /etc/httpd/ssl/ca-bundle.crl
168 # Client Authentication (Type):
169 # Client certificate verification type and depth. Types are
170 # none, optional, require and optional_no_ca. Depth is a
171 # number which specifies how deeply to verify the certificate
172 # issuer chain before deciding the certificate is not valid.
173 #SSLVerifyClient require
177 # With SSLRequire you can do per-directory access control based
178 # on arbitrary complex boolean expressions containing server
179 # variable checks and other lookup directives. The syntax is a
180 # mixture between C and Perl. See the mod_ssl documentation
183 #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
184 # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
185 # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
186 # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
187 # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
188 # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
191 # SSL Engine Options:
192 # Set various options for the SSL engine.
194 # Translate the client X.509 into a Basic Authorisation. This means that
195 # the standard Auth/DBMAuth methods can be used for access control. The
196 # user name is the `one line' version of the client's X.509 certificate.
197 # Note that no password is obtained from the user. Every entry in the user
198 # file needs this password: `xxj31ZMTZzkVA'.
200 # This exports two additional environment variables: SSL_CLIENT_CERT and
201 # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
202 # server (always existing) and the client (only existing when client
203 # authentication is used). This can be used to import the certificates
206 # This exports the standard SSL/TLS related `SSL_*' environment variables.
207 # Per default this exportation is switched off for performance reasons,
208 # because the extraction step is an expensive operation and is usually
209 # useless for serving static content. So one usually enables the
210 # exportation for CGI and SSI requests only.
212 # This exports obsolete environment variables for backward compatibility
213 # to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
214 # to provide compatibility to existing CGI scripts.
216 # This denies access when "SSLRequireSSL" or "SSLRequire" applied even
217 # under a "Satisfy any" situation, i.e. when it applies access is denied
218 # and no other module can change it.
220 # This enables optimized SSL connection renegotiation handling when SSL
221 # directives are used in per-directory context.
222 #SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
223 <Files ~ "\.(cgi|shtml|phtml|php3?)$">
224 SSLOptions +StdEnvVars
226 <Directory "//home/services/httpd/cgi-bin">
227 SSLOptions +StdEnvVars
230 # SSL Protocol Adjustments:
231 # The safe and default but still SSL/TLS standard compliant shutdown
232 # approach is that mod_ssl sends the close notify alert but doesn't wait for
233 # the close notify alert from client. When you need a different shutdown
234 # approach you can use one of the following variables:
235 # o ssl-unclean-shutdown:
236 # This forces an unclean shutdown when the connection is closed, i.e. no
237 # SSL close notify alert is send or allowed to received. This violates
238 # the SSL/TLS standard but is needed for some brain-dead browsers. Use
239 # this when you receive I/O errors because of the standard approach where
240 # mod_ssl sends the close notify alert.
241 # o ssl-accurate-shutdown:
242 # This forces an accurate shutdown when the connection is closed, i.e. a
243 # SSL close notify alert is send and mod_ssl waits for the close notify
244 # alert of the client. This is 100% SSL/TLS standard compliant, but in
245 # practice often causes hanging connections with brain-dead browsers. Use
246 # this only for browsers where you know that their SSL implementation
248 # Notice: Most problems of broken clients are also related to the HTTP
249 # keep-alive facility, so you usually additionally want to disable
250 # keep-alive for those clients, too. Use variable "nokeepalive" for this.
251 # Similarly, one has to force some clients to use HTTP/1.0 to workaround
252 # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
253 # "force-response-1.0" for this.
254 SetEnvIf User-Agent ".*MSIE.*" \
255 nokeepalive ssl-unclean-shutdown \
256 downgrade-1.0 force-response-1.0
258 # Per-Server Logging:
259 # The home of a custom SSL log file. Use this when you want a
260 # compact non-error SSL logfile on a virtual host basis.
261 CustomLog /var/log/httpd/ssl_request_log \
262 "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"