]>
Commit | Line | Data |
---|---|---|
9d781f9b MM |
1 | LoadModule ssl_module lib/apache/mod_ssl.so |
2 | ||
3 | <IfModule mod_ssl.c> | |
4 | # | |
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> | |
9 | # | |
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 | |
12 | # modssl project. | |
13 | # | |
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. | |
17 | # | |
18 | #<IfDefine SSL> | |
19 | ||
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 | |
23 | # for Apache 1.3. | |
24 | ||
25 | # | |
26 | # When we also provide SSL we have to listen to the | |
27 | # standard HTTP port (see above) and to the HTTPS port | |
28 | # | |
d918c925 | 29 | Listen 443 |
30 | ||
9d781f9b MM |
31 | # |
32 | # Dynamic Shared Object (DSO) Support | |
33 | # | |
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 | |
37 | ||
d918c925 | 38 | ## |
39 | ## SSL Global Context | |
40 | ## | |
41 | ## All SSL configuration in this context applies both to | |
42 | ## the main server and all SSL-enabled virtual hosts. | |
43 | ## | |
44 | ||
45 | # | |
46 | # Some MIME-types for downloading Certificates and CRLs | |
47 | # | |
48 | AddType application/x-x509-ca-cert .crt | |
49 | AddType application/x-pkcs7-crl .crl | |
50 | ||
51 | # Pass Phrase Dialog: | |
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 | |
56 | ||
57 | # Inter-Process Session Cache: | |
9d781f9b MM |
58 | # Configure the SSL Session Cache: First the mechanism |
59 | # to use and second the expiring timeout (in seconds). | |
d918c925 | 60 | #SSLSessionCache none |
9d781f9b MM |
61 | #SSLSessionCache shmht:logs/ssl_scache(512000) |
62 | #SSLSessionCache shmcb:logs/ssl_scache(512000) | |
63 | SSLSessionCache dbm:/var/log/httpd/ssl_scache | |
d918c925 | 64 | SSLSessionCacheTimeout 300 |
65 | ||
66 | # Semaphore: | |
9d781f9b | 67 | # Configure the path to the mutual exclusion semaphore the |
d918c925 | 68 | # SSL engine uses internally for inter-process synchronization. |
298efa2f | 69 | SSLMutex file:/var/run/apache/ssl_mutex |
d918c925 | 70 | |
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. | |
9d781f9b MM |
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. | |
d918c925 | 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 | |
87 | ||
9d781f9b MM |
88 | ## |
89 | ## SSL Virtual Host Context | |
90 | ## | |
91 | ||
ec28c761 | 92 | <VirtualHost _default_:443> |
9d781f9b MM |
93 | |
94 | # General setup for the virtual host | |
95 | DocumentRoot "/home/services/httpd/html" | |
96 | ServerName new.host.name:443 | |
97 | ServerAdmin you@your.address | |
98 | ErrorLog /var/log/httpd/error_log | |
99 | TransferLog /var/log/httpd/access_log | |
100 | ||
101 | # SSL Engine Switch: | |
102 | # Enable/Disable SSL for this virtual host. | |
ec28c761 | 103 | SSLEngine on |
9d781f9b MM |
104 | |
105 | # SSL Cipher Suite: | |
106 | # List the ciphers that the client is permitted to negotiate. | |
107 | # See the mod_ssl documentation for a complete list. | |
108 | SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL | |
109 | ||
110 | # Server Certificate: | |
111 | # Point SSLCertificateFile at a PEM encoded certificate. If | |
112 | # the certificate is encrypted, then you will be prompted for a | |
113 | # pass phrase. Note that a kill -HUP will prompt again. A test | |
114 | # certificate can be generated with `make certificate' under | |
115 | # built time. Keep in mind that if you've both a RSA and a DSA | |
116 | # certificate you can configure both in parallel (to also allow | |
117 | # the use of DSA ciphers, etc.) | |
118 | SSLCertificateFile /etc/httpd/ssl/server.crt | |
119 | #SSLCertificateFile /etc/httpd/ssl/server-dsa.crt | |
120 | ||
121 | # Server Private Key: | |
122 | # If the key is not combined with the certificate, use this | |
123 | # directive to point at the key file. Keep in mind that if | |
124 | # you've both a RSA and a DSA private key you can configure | |
125 | # both in parallel (to also allow the use of DSA ciphers, etc.) | |
126 | SSLCertificateKeyFile /etc/httpd/ssl/server.key | |
127 | #SSLCertificateKeyFile /etc/httpd/ssl/server-dsa.key | |
128 | ||
129 | # Server Certificate Chain: | |
130 | # Point SSLCertificateChainFile at a file containing the | |
131 | # concatenation of PEM encoded CA certificates which form the | |
132 | # certificate chain for the server certificate. Alternatively | |
133 | # the referenced file can be the same as SSLCertificateFile | |
134 | # when the CA certificates are directly appended to the server | |
135 | # certificate for convinience. | |
136 | #SSLCertificateChainFile /etc/httpd/ssl/ca.crt | |
137 | ||
138 | # Certificate Authority (CA): | |
139 | # Set the CA certificate verification path where to find CA | |
140 | # certificates for client authentication or alternatively one | |
141 | # huge file containing all of them (file must be PEM encoded) | |
142 | # Note: Inside SSLCACertificatePath you need hash symlinks | |
143 | # to point to the certificate files. Use the provided | |
144 | # Makefile to update the hash symlinks after changes. | |
145 | #SSLCACertificatePath /etc/httpd/ssl | |
146 | #SSLCACertificateFile /etc/httpd/ssl/ca-bundle.crt | |
147 | ||
148 | # Certificate Revocation Lists (CRL): | |
149 | # Set the CA revocation path where to find CA CRLs for client | |
150 | # authentication or alternatively one huge file containing all | |
151 | # of them (file must be PEM encoded) | |
152 | # Note: Inside SSLCARevocationPath you need hash symlinks | |
153 | # to point to the certificate files. Use the provided | |
154 | # Makefile to update the hash symlinks after changes. | |
155 | #SSLCARevocationPath /etc/httpd/ssl | |
156 | #SSLCARevocationFile /etc/httpd/ssl/ca-bundle.crl | |
157 | ||
158 | # Client Authentication (Type): | |
159 | # Client certificate verification type and depth. Types are | |
160 | # none, optional, require and optional_no_ca. Depth is a | |
161 | # number which specifies how deeply to verify the certificate | |
162 | # issuer chain before deciding the certificate is not valid. | |
ec28c761 | 163 | #SSLVerifyClient require |
164 | #SSLVerifyDepth 10 | |
165 | ||
9d781f9b MM |
166 | # Access Control: |
167 | # With SSLRequire you can do per-directory access control based | |
168 | # on arbitrary complex boolean expressions containing server | |
169 | # variable checks and other lookup directives. The syntax is a | |
170 | # mixture between C and Perl. See the mod_ssl documentation | |
171 | # for more details. | |
172 | #<Location /> | |
173 | #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ | |
174 | # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ | |
175 | # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ | |
176 | # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ | |
177 | # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ | |
178 | # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ | |
179 | #</Location> | |
180 | ||
181 | # SSL Engine Options: | |
182 | # Set various options for the SSL engine. | |
183 | # o FakeBasicAuth: | |
184 | # Translate the client X.509 into a Basic Authorisation. This means that | |
185 | # the standard Auth/DBMAuth methods can be used for access control. The | |
186 | # user name is the `one line' version of the client's X.509 certificate. | |
187 | # Note that no password is obtained from the user. Every entry in the user | |
188 | # file needs this password: `xxj31ZMTZzkVA'. | |
189 | # o ExportCertData: | |
190 | # This exports two additional environment variables: SSL_CLIENT_CERT and | |
191 | # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the | |
192 | # server (always existing) and the client (only existing when client | |
193 | # authentication is used). This can be used to import the certificates | |
194 | # into CGI scripts. | |
195 | # o StdEnvVars: | |
196 | # This exports the standard SSL/TLS related `SSL_*' environment variables. | |
197 | # Per default this exportation is switched off for performance reasons, | |
198 | # because the extraction step is an expensive operation and is usually | |
199 | # useless for serving static content. So one usually enables the | |
200 | # exportation for CGI and SSI requests only. | |
201 | # o CompatEnvVars: | |
202 | # This exports obsolete environment variables for backward compatibility | |
203 | # to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this | |
204 | # to provide compatibility to existing CGI scripts. | |
205 | # o StrictRequire: | |
206 | # This denies access when "SSLRequireSSL" or "SSLRequire" applied even | |
207 | # under a "Satisfy any" situation, i.e. when it applies access is denied | |
208 | # and no other module can change it. | |
209 | # o OptRenegotiate: | |
210 | # This enables optimized SSL connection renegotiation handling when SSL | |
211 | # directives are used in per-directory context. | |
ec28c761 | 212 | #SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire |
9d781f9b | 213 | <Files ~ "\.(cgi|shtml|phtml|php3?)$"> |
ec28c761 | 214 | SSLOptions +StdEnvVars |
215 | </Files> | |
9d781f9b | 216 | <Directory "//home/services/httpd/cgi-bin"> |
ec28c761 | 217 | SSLOptions +StdEnvVars |
218 | </Directory> | |
9d781f9b MM |
219 | |
220 | # SSL Protocol Adjustments: | |
221 | # The safe and default but still SSL/TLS standard compliant shutdown | |
222 | # approach is that mod_ssl sends the close notify alert but doesn't wait for | |
223 | # the close notify alert from client. When you need a different shutdown | |
224 | # approach you can use one of the following variables: | |
225 | # o ssl-unclean-shutdown: | |
226 | # This forces an unclean shutdown when the connection is closed, i.e. no | |
227 | # SSL close notify alert is send or allowed to received. This violates | |
228 | # the SSL/TLS standard but is needed for some brain-dead browsers. Use | |
229 | # this when you receive I/O errors because of the standard approach where | |
230 | # mod_ssl sends the close notify alert. | |
231 | # o ssl-accurate-shutdown: | |
232 | # This forces an accurate shutdown when the connection is closed, i.e. a | |
233 | # SSL close notify alert is send and mod_ssl waits for the close notify | |
234 | # alert of the client. This is 100% SSL/TLS standard compliant, but in | |
235 | # practice often causes hanging connections with brain-dead browsers. Use | |
236 | # this only for browsers where you know that their SSL implementation | |
237 | # works correctly. | |
238 | # Notice: Most problems of broken clients are also related to the HTTP | |
239 | # keep-alive facility, so you usually additionally want to disable | |
240 | # keep-alive for those clients, too. Use variable "nokeepalive" for this. | |
241 | # Similarly, one has to force some clients to use HTTP/1.0 to workaround | |
242 | # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and | |
243 | # "force-response-1.0" for this. | |
244 | SetEnvIf User-Agent ".*MSIE.*" \ | |
245 | nokeepalive ssl-unclean-shutdown \ | |
246 | downgrade-1.0 force-response-1.0 | |
247 | ||
248 | # Per-Server Logging: | |
249 | # The home of a custom SSL log file. Use this when you want a | |
250 | # compact non-error SSL logfile on a virtual host basis. | |
ec28c761 | 251 | CustomLog /var/log/httpd/ssl_request_log \ |
252 | "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" | |
253 | ||
254 | </VirtualHost> | |
9d781f9b MM |
255 | |
256 | ||
257 | </IfModule> |