Subversion Repositories configs

Rev

Rev 197 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
#
2
# When we also provide SSL we have to listen to the
3
# standard HTTPS port in addition.
4
#
5
Listen 443 https
6
 
7
##
8
##  SSL Global Context
9
##
10
##  All SSL configuration in this context applies both to
11
##  the main server and all SSL-enabled virtual hosts.
12
##
13
 
14
#   Pass Phrase Dialog:
15
#   Configure the pass phrase gathering process.
16
#   The filtering dialog program (`builtin' is a internal
17
#   terminal dialog) has to provide the pass phrase on stdout.
18
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
19
 
20
#   Inter-Process Session Cache:
21
#   Configure the SSL Session Cache: First the mechanism
22
#   to use and second the expiring timeout (in seconds).
23
SSLSessionCache         shmcb:/run/httpd/sslcache(512000)
24
SSLSessionCacheTimeout  300
25
 
26
#
27
# Use "SSLCryptoDevice" to enable any supported hardware
28
# accelerators. Use "openssl engine -v" to list supported
29
# engine names.  NOTE: If you enable an accelerator and the
30
# server does not start, consult the error logs and ensure
31
# your accelerator is functioning properly.
32
#
33
SSLCryptoDevice builtin
34
#SSLCryptoDevice ubsec
35
 
36
##
37
## SSL Virtual Host Context
38
##
39
 
40
<VirtualHost _default_:443>
41
 
42
# General setup for the virtual host, inherited from global configuration
43
#DocumentRoot "/var/www/html"
44
#ServerName www.example.com:443
45
 
46
# Use separate log files for the SSL virtual host; note that LogLevel
47
# is not inherited from httpd.conf.
48
ErrorLog logs/ssl_error_log
49
TransferLog logs/ssl_access_log
50
LogLevel warn
51
 
52
#   SSL Engine Switch:
53
#   Enable/Disable SSL for this virtual host.
54
SSLEngine on
55
 
56
#   List the protocol versions which clients are allowed to connect with.
57
#   The OpenSSL system profile is used by default.  See
58
#   update-crypto-policies(8) for more details.
59
#SSLProtocol all -SSLv3
60
#SSLProxyProtocol all -SSLv3
61
 
62
#   User agents such as web browsers are not configured for the user's
63
#   own preference of either security or performance, therefore this
64
#   must be the prerogative of the web server administrator who manages
65
#   cpu load versus confidentiality, so enforce the server's cipher order.
66
SSLHonorCipherOrder on
67
 
68
#   SSL Cipher Suite:
69
#   List the ciphers that the client is permitted to negotiate.
70
#   See the mod_ssl documentation for a complete list.
71
#   The OpenSSL system profile is configured by default.  See
72
#   update-crypto-policies(8) for more details.
73
SSLCipherSuite PROFILE=SYSTEM
74
SSLProxyCipherSuite PROFILE=SYSTEM
75
 
76
#   Point SSLCertificateFile at a PEM encoded certificate.  If
77
#   the certificate is encrypted, then you will be prompted for a
78
#   pass phrase.  Note that restarting httpd will prompt again.  Keep
79
#   in mind that if you have both an RSA and a DSA certificate you
80
#   can configure both in parallel (to also allow the use of DSA
81
#   ciphers, etc.)
82
#   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
83
#   require an ECC certificate which can also be configured in
84
#   parallel.
85
SSLCertificateFile /etc/pki/tls/certs/httpd.crt
86
 
87
#   Server Private Key:
88
#   If the key is not combined with the certificate, use this
89
#   directive to point at the key file.  Keep in mind that if
90
#   you've both a RSA and a DSA private key you can configure
91
#   both in parallel (to also allow the use of DSA ciphers, etc.)
92
#   ECC keys, when in use, can also be configured in parallel
93
SSLCertificateKeyFile /etc/pki/tls/private/httpd.key
94
 
95
#   Server Certificate Chain:
96
#   Point SSLCertificateChainFile at a file containing the
97
#   concatenation of PEM encoded CA certificates which form the
98
#   certificate chain for the server certificate. Alternatively
99
#   the referenced file can be the same as SSLCertificateFile
100
#   when the CA certificates are directly appended to the server
101
#   certificate for convenience.
102
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
103
 
104
#   Certificate Authority (CA):
105
#   Set the CA certificate verification path where to find CA
106
#   certificates for client authentication or alternatively one
107
#   huge file containing all of them (file must be PEM encoded)
108
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
109
 
110
#   Client Authentication (Type):
111
#   Client certificate verification type and depth.  Types are
112
#   none, optional, require and optional_no_ca.  Depth is a
113
#   number which specifies how deeply to verify the certificate
114
#   issuer chain before deciding the certificate is not valid.
115
#SSLVerifyClient require
116
#SSLVerifyDepth  10
117
 
118
#   Access Control:
119
#   With SSLRequire you can do per-directory access control based
120
#   on arbitrary complex boolean expressions containing server
121
#   variable checks and other lookup directives.  The syntax is a
122
#   mixture between C and Perl.  See the mod_ssl documentation
123
#   for more details.
124
#<Location />
125
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
126
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
127
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
128
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
129
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
130
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
131
#</Location>
132
 
133
#   SSL Engine Options:
134
#   Set various options for the SSL engine.
135
#   o FakeBasicAuth:
136
#     Translate the client X.509 into a Basic Authorisation.  This means that
137
#     the standard Auth/DBMAuth methods can be used for access control.  The
138
#     user name is the `one line' version of the client's X.509 certificate.
139
#     Note that no password is obtained from the user. Every entry in the user
140
#     file needs this password: `xxj31ZMTZzkVA'.
141
#   o ExportCertData:
142
#     This exports two additional environment variables: SSL_CLIENT_CERT and
143
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
144
#     server (always existing) and the client (only existing when client
145
#     authentication is used). This can be used to import the certificates
146
#     into CGI scripts.
147
#   o StdEnvVars:
148
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
149
#     Per default this exportation is switched off for performance reasons,
150
#     because the extraction step is an expensive operation and is usually
151
#     useless for serving static content. So one usually enables the
152
#     exportation for CGI and SSI requests only.
153
#   o StrictRequire:
154
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
155
#     under a "Satisfy any" situation, i.e. when it applies access is denied
156
#     and no other module can change it.
157
#   o OptRenegotiate:
158
#     This enables optimized SSL connection renegotiation handling when SSL
159
#     directives are used in per-directory context.
160
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
161
<FilesMatch "\.(cgi|shtml|phtml|php)$">
162
    SSLOptions +StdEnvVars
163
</FilesMatch>
164
<Directory "/var/www/cgi-bin">
165
    SSLOptions +StdEnvVars
166
</Directory>
167
 
168
#   SSL Protocol Adjustments:
169
#   The safe and default but still SSL/TLS standard compliant shutdown
170
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
171
#   the close notify alert from client. When you need a different shutdown
172
#   approach you can use one of the following variables:
173
#   o ssl-unclean-shutdown:
174
#     This forces an unclean shutdown when the connection is closed, i.e. no
175
#     SSL close notify alert is sent or allowed to be received.  This violates
176
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
177
#     this when you receive I/O errors because of the standard approach where
178
#     mod_ssl sends the close notify alert.
179
#   o ssl-accurate-shutdown:
180
#     This forces an accurate shutdown when the connection is closed, i.e. a
181
#     SSL close notify alert is sent and mod_ssl waits for the close notify
182
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
183
#     practice often causes hanging connections with brain-dead browsers. Use
184
#     this only for browsers where you know that their SSL implementation
185
#     works correctly.
186
#   Notice: Most problems of broken clients are also related to the HTTP
187
#   keep-alive facility, so you usually additionally want to disable
188
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
189
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
190
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
191
#   "force-response-1.0" for this.
192
BrowserMatch "MSIE [2-5]" \
193
         nokeepalive ssl-unclean-shutdown \
194
         downgrade-1.0 force-response-1.0
195
 
196
#   Per-Server Logging:
197
#   The home of a custom SSL log file. Use this when you want a
198
#   compact non-error SSL logfile on a virtual host basis.
199
CustomLog logs/ssl_request_log \
200
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
201
 
202
</VirtualHost>
203
 
204
 
205
 
206
 
207
<VirtualHost *:443>
208
DocumentRoot "/var/www/munatrading"
209
ServerName www.dev.munatrading.com
210
ServerAlias dev.munatrading.com
211
 
212
ErrorLog logs/ssl_error_log
213
TransferLog logs/ssl_access_log
214
LogLevel warn
215
 
216
# HSTS (15768000 seconds = 6 month)
217
Header always set Strict-Transport-Security "max-age=15768000; preload"
218
# Prevent browsers from incorrectly detecting non-scripts as scripts
219
Header always set X-Content-Type-Options nosniff
220
# Cors
221
Header always set Access-Control-Allow-Origin "*"
222
# CSP calculated by FF Addon Laboratory
223
###Header always set Content-Security-Policy "default-src 'none'; connect-src 'self'; font-src 'self' https://fonts.gstatic.com https://maxcdn.bootstrapcdn.com; frame-src data:; img-src 'self' data: https://counters.auctiva.com https://i.ebayimg.com https://i.thenile.io https://img.comc.com https://ir.ebaystatic.com https://scimg.auctiva.com https://storage.googleapis.com https://*.ebaystatic.com https://ti2.auctiva.com https://www.thenile.com.au https://cdn.shopify.com; script-src 'self' 'unsafe-inline' https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js https://cdn.jsdelivr.net/npm/lodash@4.17.11/lodash.min.js https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.2/js/bootstrap-select.js https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.23/moment-timezone-with-data-2012-2022.min.js https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.23.0/moment.min.js https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js https://maps.googleapis.com/maps-api-v3/api/js/ https://maps.googleapis.com/maps/api/js https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js; style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.2/css/ https://fonts.googleapis.com/ https://img.comc.com/Content/eBay/ https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/ https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/ https://scrollinggallery.auctiva.com/gallery/css/2(0)/AUCTIVA/1362185/0/25/ https://storage.googleapis.com/ebay-assets/grandeagle/css/ https://www.w3schools.com/w3css/4/;frame-ancestors 'self'"
224
# Disable referrers for browsers that don't support strict-origin-when-cross-origin; Uses strict-origin-when-cross-origin for browsers that do
225
Header always set Referrer-Policy "no-referrer"
226
# Only allow my site to frame itself
227
#add above# Header always add Content-Security-Policy "frame-ancestors 'self'"
228
Header always set X-Frame-Options SAMEORIGIN
229
# XSS Protection
230
Header set X-XSS-Protection "1; mode=block"
231
# Redirect all non-www access to www
232
RewriteEngine On
233
RewriteCond %{HTTP_HOST} !^www\. [NC]
234
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
235
 
236
SSLEngine on
237
SSLProtocol all -SSLv2 -SSLv3
238
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
239
SSLHonorCipherOrder On
240
SSLCertificateFile /etc/letsencrypt/live/dev.munatrading.com/cert.pem
241
SSLCertificateKeyFile /etc/letsencrypt/live/dev.munatrading.com/privkey.pem
242
SSLCertificateChainFile /etc/letsencrypt/live/dev.munatrading.com/chain.pem
243
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
244
    SSLOptions +StdEnvVars
245
</Files>
246
<Directory "/var/www/cgi-bin">
247
    SSLOptions +StdEnvVars
248
</Directory>
249
<Directory "/var/www/munatrading/ebay/listings">
250
  Options +Indexes
251
  IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble
252
</Directory>
253
SetEnvIf User-Agent ".*MSIE.*" \
254
         nokeepalive ssl-unclean-shutdown \
255
         downgrade-1.0 force-response-1.0
256
CustomLog logs/ssl_request_log \
257
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
258
</VirtualHost>
259
 
260
<VirtualHost *:443>
261
DocumentRoot "/var/www/cheapmusic/www"
262
ServerName www.dev.findcheapmusic.com
263
ServerAlias dev.findcheapmusic.com
264
 
265
ErrorDocument 403 /index.php
266
ErrorDocument 404 /index.php
267
 
268
ErrorLog logs/ssl_error_log
269
TransferLog logs/ssl_access_log
270
LogLevel warn
271
 
272
# HSTS (31536000 seconds = 1 year)
273
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
274
# Prevent browsers from incorrectly detecting non-scripts as scripts
275
Header always set X-Content-Type-Options nosniff
276
# Cors
277
Header always set Access-Control-Allow-Origin "*"
278
# Disable unsafe inline/eval, only allow loading of resources (images, fonts, scripts, etc.) over https
279
###Header always set Content-Security-Policy "default-src 'none'; connect-src 'self'; font-src 'self' data: https://fonts.gstatic.com https://use.fontawesome.com; form-action 'self'; frame-src https://www.google.com https://www.youtube-nocookie.com; img-src 'self' data: http://abs.twimg.com https://abs.twimg.com https://*.walmartimages.com https://images.samash.com https://img.discogs.com https://*.googleusercontent.com https://*.ebaystatic.com https://www.fye.com https://www.musicnotes.com https://platform-lookaside.fbsbx.com https://ad.linksynergy.com https://www.lduhtrp.net https://*.wal.co https://cj.dotomi.com https://www.awltovhc.com https://www.ftjcfx.com https://www.tqlkg.com https://www.emjcd.com https://www.yceml.net https://beacon.affil.walmart.com https://assets.sheetmusicplus.com https://www0.alibris-static.com https://*.mzstatic.com https://via.placeholder.com https://images-na.ssl-images-amazon.com/images/ https://transform.dis.commercecloud.salesforce.com https://www.google-analytics.com https://m.media-amazon.com/images/ https://www.facebook.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://ajax.googleapis.com/ajax/libs/jquery/ https://cdnjs.cloudflare.com/ajax/libs/popper.js/ https://maxcdn.bootstrapcdn.com/bootstrap/ https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ https://ssl.gstatic.com https://www.googletagmanager.com/gtag/js https://www.google-analytics.com https://use.fontawesome.com/releases/ https://connect.facebook.net/; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com/ https://maxcdn.bootstrapcdn.com/bootstrap/;frame-ancestors 'self';manifest-src 'self'"
280
# Disable referrers for browsers that don't support strict-origin-when-cross-origin; Uses strict-origin-when-cross-origin for browsers that do
281
Header always set Referrer-Policy "no-referrer"
282
# Only allow my site to frame itself
283
#add above# Header always add Content-Security-Policy "frame-ancestors 'self'"
284
Header always set X-Frame-Options SAMEORIGIN
285
# XSS Protection
286
Header set X-XSS-Protection "1; mode=block"
287
# Redirect all non-www access to www
288
RewriteEngine On
289
RewriteCond %{HTTP_HOST} !^www\. [NC]
290
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
291
 
292
SSLEngine on
293
# intermediate configuration
294
SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
295
SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
296
SSLHonorCipherOrder     off
297
 
298
SSLCertificateFile /etc/letsencrypt/live/dev.findcheapmusic.com/cert.pem
299
SSLCertificateKeyFile /etc/letsencrypt/live/dev.findcheapmusic.com/privkey.pem
300
SSLCertificateChainFile /etc/letsencrypt/live/dev.findcheapmusic.com/chain.pem
301
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
302
    SSLOptions +StdEnvVars
303
</Files>
304
<Directory "/var/www/cgi-bin">
305
    SSLOptions +StdEnvVars
306
</Directory>
307
SetEnvIf User-Agent ".*MSIE.*" \
308
         nokeepalive ssl-unclean-shutdown \
309
         downgrade-1.0 force-response-1.0
310
CustomLog logs/ssl_request_log \
311
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
312
</VirtualHost>
313
 
314
 
315
<VirtualHost *:443>
316
DocumentRoot "/var/www/archerygear"
317
ServerName www.dev.archerygearonline.com
318
ServerAlias dev.archerygearonline.com
319
 
320
ErrorDocument 403 /index.html
321
ErrorDocument 404 /index.html
322
 
323
ErrorLog logs/ssl_error_log
324
TransferLog logs/ssl_access_log
325
LogLevel warn
326
 
327
# HSTS (31536000 seconds = 1 year)
328
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
329
# Prevent browsers from incorrectly detecting non-scripts as scripts
330
Header always set X-Content-Type-Options nosniff
331
# Cors
332
Header always set Access-Control-Allow-Origin "*"
333
# CSP calculated by FF Addon Laboratory
334
#Header always set Content-Security-Policy "default-src 'none'; frame-src https://ws-na.amazon-adsystem.com https://www.youtube-nocookie.com; img-src 'self' data: https://www.google-analytics.com; script-src 'self' 'unsafe-inline' https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js https://www.google-analytics.com/analytics.js https://www.googletagmanager.com/gtag/js; style-src 'self' 'unsafe-inline' https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/;frame-ancestors 'self'"
335
# Disable referrers for browsers that don't support strict-origin-when-cross-origin; Uses strict-origin-when-cross-origin for browsers that do
336
Header always set Referrer-Policy "no-referrer"
337
# Only allow my site to frame itself
338
#add above# Header always add Content-Security-Policy "frame-ancestors 'self'"
339
Header always set X-Frame-Options SAMEORIGIN
340
# XSS Protection
341
Header set X-XSS-Protection "1; mode=block"
342
# Redirect all non-www access to www
343
RewriteEngine On
344
RewriteCond %{HTTP_HOST} !^www\. [NC]
345
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
346
 
347
SSLEngine on
348
# intermediate configuration
349
SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
350
SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
351
SSLHonorCipherOrder     off
352
 
353
SSLCertificateFile /etc/letsencrypt/live/dev.archerygearonline.com/cert.pem
354
SSLCertificateKeyFile /etc/letsencrypt/live/dev.archerygearonline.com/privkey.pem
355
SSLCertificateChainFile /etc/letsencrypt/live/dev.archerygearonline.com/chain.pem
356
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
357
    SSLOptions +StdEnvVars
358
</Files>
359
<Directory "/var/www/cgi-bin">
360
    SSLOptions +StdEnvVars
361
</Directory>
362
SetEnvIf User-Agent ".*MSIE.*" \
363
         nokeepalive ssl-unclean-shutdown \
364
         downgrade-1.0 force-response-1.0
365
CustomLog logs/ssl_request_log \
366
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
367
</VirtualHost>