Subversion Repositories configs

Rev

Rev 132 | Rev 142 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
#
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.2/mod/mod_ssl.html>
6
#
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.
10
#
11
 
12
LoadModule ssl_module modules/mod_ssl.so
13
 
14
#
15
# When we also provide SSL we have to listen to the
16
# the HTTPS port in addition.
17
#
18
Listen 443
141 - 19
NameVirtualHost *:443
4 - 20
 
21
##
22
##  SSL Global Context
23
##
24
##  All SSL configuration in this context applies both to
25
##  the main server and all SSL-enabled virtual hosts.
26
##
27
 
28
#   Pass Phrase Dialog:
29
#   Configure the pass phrase gathering process.
30
#   The filtering dialog program (`builtin' is a internal
31
#   terminal dialog) has to provide the pass phrase on stdout.
32
SSLPassPhraseDialog  builtin
33
 
34
#   Inter-Process Session Cache:
35
#   Configure the SSL Session Cache: First the mechanism
36
#   to use and second the expiring timeout (in seconds).
37
SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
38
SSLSessionCacheTimeout  300
39
 
40
#   Semaphore:
41
#   Configure the path to the mutual exclusion semaphore the
42
#   SSL engine uses internally for inter-process synchronization.
43
SSLMutex default
44
 
45
#   Pseudo Random Number Generator (PRNG):
46
#   Configure one or more sources to seed the PRNG of the
47
#   SSL library. The seed data should be of good random quality.
48
#   WARNING! On some platforms /dev/random blocks if not enough entropy
49
#   is available. This means you then cannot use the /dev/random device
50
#   because it would lead to very long connection times (as long as
51
#   it requires to make more entropy available). But usually those
52
#   platforms additionally provide a /dev/urandom device which doesn't
53
#   block. So, if available, use this one instead. Read the mod_ssl User
54
#   Manual for more details.
55
SSLRandomSeed startup file:/dev/urandom  256
56
SSLRandomSeed connect builtin
57
#SSLRandomSeed startup file:/dev/random  512
58
#SSLRandomSeed connect file:/dev/random  512
59
#SSLRandomSeed connect file:/dev/urandom 512
60
 
61
#
62
# Use "SSLCryptoDevice" to enable any supported hardware
63
# accelerators. Use "openssl engine -v" to list supported
64
# engine names.  NOTE: If you enable an accelerator and the
65
# server does not start, consult the error logs and ensure
66
# your accelerator is functioning properly.
67
#
68
SSLCryptoDevice builtin
69
#SSLCryptoDevice ubsec
70
 
71
##
72
## SSL Virtual Host Context
73
##
74
 
141 - 75
#<VirtualHost _default_:443>
76
<VirtualHost *:443>
4 - 77
 
78
# General setup for the virtual host, inherited from global configuration
132 - 79
DocumentRoot "/var/www/shtml"
141 - 80
ServerName ujsoftware.linkpc.net:443
4 - 81
 
82
# Use separate log files for the SSL virtual host; note that LogLevel
83
# is not inherited from httpd.conf.
84
ErrorLog logs/ssl_error_log
85
TransferLog logs/ssl_access_log
86
LogLevel warn
87
 
88
#   SSL Engine Switch:
89
#   Enable/Disable SSL for this virtual host.
90
SSLEngine on
91
 
92
#   SSL Protocol support:
93
# List the enable protocol levels with which clients will be able to
94
# connect.  Disable SSLv2 access by default:
132 - 95
SSLProtocol all -SSLv2 -SSLv3
4 - 96
 
97
#   SSL Cipher Suite:
98
# List the ciphers that the client is permitted to negotiate.
99
# See the mod_ssl documentation for a complete list.
132 - 100
#SSLCipherSuite DEFAULT:!EXP:!SSLv2:!DES:!IDEA:!SEED:+3DES
101
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
102
SSLHonorCipherOrder On
4 - 103
 
104
#   Server Certificate:
105
# Point SSLCertificateFile at a PEM encoded certificate.  If
106
# the certificate is encrypted, then you will be prompted for a
107
# pass phrase.  Note that a kill -HUP will prompt again.  A new
108
# certificate can be generated using the genkey(1) command.
132 - 109
SSLCertificateFile /etc/letsencrypt/live/ujsoftware.linkpc.net/cert.pem
4 - 110
 
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.)
132 - 116
SSLCertificateKeyFile /etc/letsencrypt/live/ujsoftware.linkpc.net/privkey.pem
4 - 117
 
118
#   Server Certificate Chain:
119
#   Point SSLCertificateChainFile at a file containing the
120
#   concatenation of PEM encoded CA certificates which form the
121
#   certificate chain for the server certificate. Alternatively
122
#   the referenced file can be the same as SSLCertificateFile
123
#   when the CA certificates are directly appended to the server
124
#   certificate for convinience.
132 - 125
SSLCertificateChainFile /etc/letsencrypt/live/ujsoftware.linkpc.net/chain.pem
4 - 126
 
127
#   Certificate Authority (CA):
128
#   Set the CA certificate verification path where to find CA
129
#   certificates for client authentication or alternatively one
130
#   huge file containing all of them (file must be PEM encoded)
141 - 131
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
132
 
133
#   Client Authentication (Type):
134
#   Client certificate verification type and depth.  Types are
135
#   none, optional, require and optional_no_ca.  Depth is a
136
#   number which specifies how deeply to verify the certificate
137
#   issuer chain before deciding the certificate is not valid.
138
#SSLVerifyClient require
139
#SSLVerifyDepth  10
140
 
141
#   Access Control:
142
#   With SSLRequire you can do per-directory access control based
143
#   on arbitrary complex boolean expressions containing server
144
#   variable checks and other lookup directives.  The syntax is a
145
#   mixture between C and Perl.  See the mod_ssl documentation
146
#   for more details.
147
#<Location />
148
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
149
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
150
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
151
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
152
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
153
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
154
#</Location>
155
 
156
#   SSL Engine Options:
157
#   Set various options for the SSL engine.
158
#   o FakeBasicAuth:
159
#     Translate the client X.509 into a Basic Authorisation.  This means that
160
#     the standard Auth/DBMAuth methods can be used for access control.  The
161
#     user name is the `one line' version of the client's X.509 certificate.
162
#     Note that no password is obtained from the user. Every entry in the user
163
#     file needs this password: `xxj31ZMTZzkVA'.
164
#   o ExportCertData:
165
#     This exports two additional environment variables: SSL_CLIENT_CERT and
166
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
167
#     server (always existing) and the client (only existing when client
168
#     authentication is used). This can be used to import the certificates
169
#     into CGI scripts.
170
#   o StdEnvVars:
171
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
172
#     Per default this exportation is switched off for performance reasons,
173
#     because the extraction step is an expensive operation and is usually
174
#     useless for serving static content. So one usually enables the
175
#     exportation for CGI and SSI requests only.
176
#   o StrictRequire:
177
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
178
#     under a "Satisfy any" situation, i.e. when it applies access is denied
179
#     and no other module can change it.
180
#   o OptRenegotiate:
181
#     This enables optimized SSL connection renegotiation handling when SSL
182
#     directives are used in per-directory context.
183
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
184
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
185
    SSLOptions +StdEnvVars
186
</Files>
187
<Directory "/var/www/cgi-bin">
188
    SSLOptions +StdEnvVars
189
</Directory>
190
<Directory "/var/www/shtml/ebay/listings">
191
  Options +Indexes
192
  IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble
193
</Directory>
194
 
195
#   SSL Protocol Adjustments:
196
#   The safe and default but still SSL/TLS standard compliant shutdown
197
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
198
#   the close notify alert from client. When you need a different shutdown
199
#   approach you can use one of the following variables:
200
#   o ssl-unclean-shutdown:
201
#     This forces an unclean shutdown when the connection is closed, i.e. no
202
#     SSL close notify alert is send or allowed to received.  This violates
203
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
204
#     this when you receive I/O errors because of the standard approach where
205
#     mod_ssl sends the close notify alert.
206
#   o ssl-accurate-shutdown:
207
#     This forces an accurate shutdown when the connection is closed, i.e. a
208
#     SSL close notify alert is send and mod_ssl waits for the close notify
209
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
210
#     practice often causes hanging connections with brain-dead browsers. Use
211
#     this only for browsers where you know that their SSL implementation
212
#     works correctly.
213
#   Notice: Most problems of broken clients are also related to the HTTP
214
#   keep-alive facility, so you usually additionally want to disable
215
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
216
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
217
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
218
#   "force-response-1.0" for this.
219
SetEnvIf User-Agent ".*MSIE.*" \
220
         nokeepalive ssl-unclean-shutdown \
221
         downgrade-1.0 force-response-1.0
222
 
223
#   Per-Server Logging:
224
#   The home of a custom SSL log file. Use this when you want a
225
#   compact non-error SSL logfile on a virtual host basis.
226
CustomLog logs/ssl_request_log \
227
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
228
 
229
</VirtualHost>
230
 
231
 
232
 
233
 
234
 
235
#<VirtualHost _default_:443>
236
<VirtualHost *:443>
237
 
238
# General setup for the virtual host, inherited from global configuration
239
DocumentRoot "/var/www/cheapmusic"
240
ServerName www.findcheapmusic.com:443
241
 
242
# Use separate log files for the SSL virtual host; note that LogLevel
243
# is not inherited from httpd.conf.
244
ErrorLog logs/ssl_error_log
245
TransferLog logs/ssl_access_log
246
LogLevel warn
247
 
248
#   SSL Engine Switch:
249
#   Enable/Disable SSL for this virtual host.
250
SSLEngine on
251
 
252
#   SSL Protocol support:
253
# List the enable protocol levels with which clients will be able to
254
# connect.  Disable SSLv2 access by default:
255
SSLProtocol all -SSLv2 -SSLv3
256
 
257
#   SSL Cipher Suite:
258
# List the ciphers that the client is permitted to negotiate.
259
# See the mod_ssl documentation for a complete list.
260
#SSLCipherSuite DEFAULT:!EXP:!SSLv2:!DES:!IDEA:!SEED:+3DES
261
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
262
SSLHonorCipherOrder On
263
 
264
#   Server Certificate:
265
# Point SSLCertificateFile at a PEM encoded certificate.  If
266
# the certificate is encrypted, then you will be prompted for a
267
# pass phrase.  Note that a kill -HUP will prompt again.  A new
268
# certificate can be generated using the genkey(1) command.
269
SSLCertificateFile /etc/letsencrypt/live/ujsoftware.linkpc.net/cert.pem
270
 
271
#   Server Private Key:
272
#   If the key is not combined with the certificate, use this
273
#   directive to point at the key file.  Keep in mind that if
274
#   you've both a RSA and a DSA private key you can configure
275
#   both in parallel (to also allow the use of DSA ciphers, etc.)
276
SSLCertificateKeyFile /etc/letsencrypt/live/ujsoftware.linkpc.net/privkey.pem
277
 
278
#   Server Certificate Chain:
279
#   Point SSLCertificateChainFile at a file containing the
280
#   concatenation of PEM encoded CA certificates which form the
281
#   certificate chain for the server certificate. Alternatively
282
#   the referenced file can be the same as SSLCertificateFile
283
#   when the CA certificates are directly appended to the server
284
#   certificate for convinience.
285
SSLCertificateChainFile /etc/letsencrypt/live/ujsoftware.linkpc.net/chain.pem
286
 
287
#   Certificate Authority (CA):
288
#   Set the CA certificate verification path where to find CA
289
#   certificates for client authentication or alternatively one
290
#   huge file containing all of them (file must be PEM encoded)
4 - 291
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
292
 
293
#   Client Authentication (Type):
294
#   Client certificate verification type and depth.  Types are
295
#   none, optional, require and optional_no_ca.  Depth is a
296
#   number which specifies how deeply to verify the certificate
297
#   issuer chain before deciding the certificate is not valid.
298
#SSLVerifyClient require
299
#SSLVerifyDepth  10
300
 
301
#   Access Control:
302
#   With SSLRequire you can do per-directory access control based
303
#   on arbitrary complex boolean expressions containing server
304
#   variable checks and other lookup directives.  The syntax is a
305
#   mixture between C and Perl.  See the mod_ssl documentation
306
#   for more details.
307
#<Location />
308
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
309
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
310
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
311
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
312
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
313
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
314
#</Location>
315
 
316
#   SSL Engine Options:
317
#   Set various options for the SSL engine.
318
#   o FakeBasicAuth:
319
#     Translate the client X.509 into a Basic Authorisation.  This means that
320
#     the standard Auth/DBMAuth methods can be used for access control.  The
321
#     user name is the `one line' version of the client's X.509 certificate.
322
#     Note that no password is obtained from the user. Every entry in the user
323
#     file needs this password: `xxj31ZMTZzkVA'.
324
#   o ExportCertData:
325
#     This exports two additional environment variables: SSL_CLIENT_CERT and
326
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
327
#     server (always existing) and the client (only existing when client
328
#     authentication is used). This can be used to import the certificates
329
#     into CGI scripts.
330
#   o StdEnvVars:
331
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
332
#     Per default this exportation is switched off for performance reasons,
333
#     because the extraction step is an expensive operation and is usually
334
#     useless for serving static content. So one usually enables the
335
#     exportation for CGI and SSI requests only.
336
#   o StrictRequire:
337
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
338
#     under a "Satisfy any" situation, i.e. when it applies access is denied
339
#     and no other module can change it.
340
#   o OptRenegotiate:
341
#     This enables optimized SSL connection renegotiation handling when SSL
342
#     directives are used in per-directory context.
343
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
344
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
345
    SSLOptions +StdEnvVars
346
</Files>
347
<Directory "/var/www/cgi-bin">
348
    SSLOptions +StdEnvVars
349
</Directory>
132 - 350
<Directory "/var/www/shtml/ebay/listings">
351
  Options +Indexes
352
  IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble
353
</Directory>
4 - 354
 
355
#   SSL Protocol Adjustments:
356
#   The safe and default but still SSL/TLS standard compliant shutdown
357
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
358
#   the close notify alert from client. When you need a different shutdown
359
#   approach you can use one of the following variables:
360
#   o ssl-unclean-shutdown:
361
#     This forces an unclean shutdown when the connection is closed, i.e. no
362
#     SSL close notify alert is send or allowed to received.  This violates
363
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
364
#     this when you receive I/O errors because of the standard approach where
365
#     mod_ssl sends the close notify alert.
366
#   o ssl-accurate-shutdown:
367
#     This forces an accurate shutdown when the connection is closed, i.e. a
368
#     SSL close notify alert is send and mod_ssl waits for the close notify
369
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
370
#     practice often causes hanging connections with brain-dead browsers. Use
371
#     this only for browsers where you know that their SSL implementation
372
#     works correctly.
373
#   Notice: Most problems of broken clients are also related to the HTTP
374
#   keep-alive facility, so you usually additionally want to disable
375
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
376
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
377
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
378
#   "force-response-1.0" for this.
379
SetEnvIf User-Agent ".*MSIE.*" \
380
         nokeepalive ssl-unclean-shutdown \
381
         downgrade-1.0 force-response-1.0
382
 
383
#   Per-Server Logging:
384
#   The home of a custom SSL log file. Use this when you want a
385
#   compact non-error SSL logfile on a virtual host basis.
386
CustomLog logs/ssl_request_log \
387
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
388
 
132 - 389
</VirtualHost>