Subversion Repositories configs

Rev

Rev 192 | Go to most recent revision | Details | Compare with Previous | 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>
197 - 41
Protocols h2 http/1.1
192 - 42
 
43
# General setup for the virtual host, inherited from global configuration
44
#DocumentRoot "/var/www/html"
45
#ServerName www.example.com:443
46
 
47
# Use separate log files for the SSL virtual host; note that LogLevel
48
# is not inherited from httpd.conf.
49
ErrorLog logs/ssl_error_log
50
TransferLog logs/ssl_access_log
51
LogLevel warn
52
 
53
#   SSL Engine Switch:
54
#   Enable/Disable SSL for this virtual host.
55
SSLEngine on
56
 
57
#   List the protocol versions which clients are allowed to connect with.
58
#   The OpenSSL system profile is used by default.  See
59
#   update-crypto-policies(8) for more details.
60
#SSLProtocol all -SSLv3
61
#SSLProxyProtocol all -SSLv3
62
 
63
#   User agents such as web browsers are not configured for the user's
64
#   own preference of either security or performance, therefore this
65
#   must be the prerogative of the web server administrator who manages
66
#   cpu load versus confidentiality, so enforce the server's cipher order.
67
SSLHonorCipherOrder on
68
 
69
#   SSL Cipher Suite:
70
#   List the ciphers that the client is permitted to negotiate.
71
#   See the mod_ssl documentation for a complete list.
72
#   The OpenSSL system profile is configured by default.  See
73
#   update-crypto-policies(8) for more details.
74
SSLCipherSuite PROFILE=SYSTEM
75
SSLProxyCipherSuite PROFILE=SYSTEM
76
 
77
#   Point SSLCertificateFile at a PEM encoded certificate.  If
78
#   the certificate is encrypted, then you will be prompted for a
79
#   pass phrase.  Note that restarting httpd will prompt again.  Keep
80
#   in mind that if you have both an RSA and a DSA certificate you
81
#   can configure both in parallel (to also allow the use of DSA
82
#   ciphers, etc.)
83
#   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
84
#   require an ECC certificate which can also be configured in
85
#   parallel.
86
SSLCertificateFile /etc/pki/tls/certs/httpd.crt
87
 
88
#   Server Private Key:
89
#   If the key is not combined with the certificate, use this
90
#   directive to point at the key file.  Keep in mind that if
91
#   you've both a RSA and a DSA private key you can configure
92
#   both in parallel (to also allow the use of DSA ciphers, etc.)
93
#   ECC keys, when in use, can also be configured in parallel
94
SSLCertificateKeyFile /etc/pki/tls/private/httpd.key
95
 
96
#   Server Certificate Chain:
97
#   Point SSLCertificateChainFile at a file containing the
98
#   concatenation of PEM encoded CA certificates which form the
99
#   certificate chain for the server certificate. Alternatively
100
#   the referenced file can be the same as SSLCertificateFile
101
#   when the CA certificates are directly appended to the server
102
#   certificate for convenience.
103
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
104
 
105
#   Certificate Authority (CA):
106
#   Set the CA certificate verification path where to find CA
107
#   certificates for client authentication or alternatively one
108
#   huge file containing all of them (file must be PEM encoded)
109
#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
110
 
111
#   Client Authentication (Type):
112
#   Client certificate verification type and depth.  Types are
113
#   none, optional, require and optional_no_ca.  Depth is a
114
#   number which specifies how deeply to verify the certificate
115
#   issuer chain before deciding the certificate is not valid.
116
#SSLVerifyClient require
117
#SSLVerifyDepth  10
118
 
119
#   Access Control:
120
#   With SSLRequire you can do per-directory access control based
121
#   on arbitrary complex boolean expressions containing server
122
#   variable checks and other lookup directives.  The syntax is a
123
#   mixture between C and Perl.  See the mod_ssl documentation
124
#   for more details.
125
#<Location />
126
#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
127
#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
128
#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
129
#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
130
#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
131
#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
132
#</Location>
133
 
134
#   SSL Engine Options:
135
#   Set various options for the SSL engine.
136
#   o FakeBasicAuth:
137
#     Translate the client X.509 into a Basic Authorisation.  This means that
138
#     the standard Auth/DBMAuth methods can be used for access control.  The
139
#     user name is the `one line' version of the client's X.509 certificate.
140
#     Note that no password is obtained from the user. Every entry in the user
141
#     file needs this password: `xxj31ZMTZzkVA'.
142
#   o ExportCertData:
143
#     This exports two additional environment variables: SSL_CLIENT_CERT and
144
#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
145
#     server (always existing) and the client (only existing when client
146
#     authentication is used). This can be used to import the certificates
147
#     into CGI scripts.
148
#   o StdEnvVars:
149
#     This exports the standard SSL/TLS related `SSL_*' environment variables.
150
#     Per default this exportation is switched off for performance reasons,
151
#     because the extraction step is an expensive operation and is usually
152
#     useless for serving static content. So one usually enables the
153
#     exportation for CGI and SSI requests only.
154
#   o StrictRequire:
155
#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
156
#     under a "Satisfy any" situation, i.e. when it applies access is denied
157
#     and no other module can change it.
158
#   o OptRenegotiate:
159
#     This enables optimized SSL connection renegotiation handling when SSL
160
#     directives are used in per-directory context.
161
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
162
<FilesMatch "\.(cgi|shtml|phtml|php)$">
163
    SSLOptions +StdEnvVars
164
</FilesMatch>
165
<Directory "/var/www/cgi-bin">
166
    SSLOptions +StdEnvVars
167
</Directory>
168
 
169
#   SSL Protocol Adjustments:
170
#   The safe and default but still SSL/TLS standard compliant shutdown
171
#   approach is that mod_ssl sends the close notify alert but doesn't wait for
172
#   the close notify alert from client. When you need a different shutdown
173
#   approach you can use one of the following variables:
174
#   o ssl-unclean-shutdown:
175
#     This forces an unclean shutdown when the connection is closed, i.e. no
176
#     SSL close notify alert is sent or allowed to be received.  This violates
177
#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
178
#     this when you receive I/O errors because of the standard approach where
179
#     mod_ssl sends the close notify alert.
180
#   o ssl-accurate-shutdown:
181
#     This forces an accurate shutdown when the connection is closed, i.e. a
182
#     SSL close notify alert is sent and mod_ssl waits for the close notify
183
#     alert of the client. This is 100% SSL/TLS standard compliant, but in
184
#     practice often causes hanging connections with brain-dead browsers. Use
185
#     this only for browsers where you know that their SSL implementation
186
#     works correctly.
187
#   Notice: Most problems of broken clients are also related to the HTTP
188
#   keep-alive facility, so you usually additionally want to disable
189
#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
190
#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
191
#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
192
#   "force-response-1.0" for this.
193
BrowserMatch "MSIE [2-5]" \
194
         nokeepalive ssl-unclean-shutdown \
195
         downgrade-1.0 force-response-1.0
196
 
197
#   Per-Server Logging:
198
#   The home of a custom SSL log file. Use this when you want a
199
#   compact non-error SSL logfile on a virtual host basis.
200
CustomLog logs/ssl_request_log \
201
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
202
 
203
</VirtualHost>
204
 
205
 
206
 
207
 
208
<VirtualHost *:443>
209
DocumentRoot "/var/www/munatrading"
210
ServerName www.dev.munatrading.com
211
ServerAlias dev.munatrading.com
197 - 212
Protocols h2 http/1.1
192 - 213
 
214
ErrorLog logs/ssl_error_log
215
TransferLog logs/ssl_access_log
216
LogLevel warn
217
 
218
# HSTS (15768000 seconds = 6 month)
219
Header always set Strict-Transport-Security "max-age=15768000; preload"
220
# Prevent browsers from incorrectly detecting non-scripts as scripts
221
Header always set X-Content-Type-Options nosniff
222
# Cors
223
Header always set Access-Control-Allow-Origin "*"
224
# CSP calculated by FF Addon Laboratory
225
###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'"
226
# Disable referrers for browsers that don't support strict-origin-when-cross-origin; Uses strict-origin-when-cross-origin for browsers that do
227
Header always set Referrer-Policy "no-referrer"
228
# Only allow my site to frame itself
229
#add above# Header always add Content-Security-Policy "frame-ancestors 'self'"
230
Header always set X-Frame-Options SAMEORIGIN
231
# XSS Protection
232
Header set X-XSS-Protection "1; mode=block"
233
# Redirect all non-www access to www
234
RewriteEngine On
235
RewriteCond %{HTTP_HOST} !^www\. [NC]
236
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
237
 
238
SSLEngine on
239
SSLProtocol all -SSLv2 -SSLv3
240
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
241
SSLHonorCipherOrder On
242
SSLCertificateFile /etc/letsencrypt/live/dev.munatrading.com/cert.pem
243
SSLCertificateKeyFile /etc/letsencrypt/live/dev.munatrading.com/privkey.pem
244
SSLCertificateChainFile /etc/letsencrypt/live/dev.munatrading.com/chain.pem
245
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
246
    SSLOptions +StdEnvVars
247
</Files>
248
<Directory "/var/www/cgi-bin">
249
    SSLOptions +StdEnvVars
250
</Directory>
251
<Directory "/var/www/munatrading/ebay/listings">
252
  Options +Indexes
253
  IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble
254
</Directory>
255
SetEnvIf User-Agent ".*MSIE.*" \
256
         nokeepalive ssl-unclean-shutdown \
257
         downgrade-1.0 force-response-1.0
258
CustomLog logs/ssl_request_log \
259
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
260
</VirtualHost>
261
 
262
<VirtualHost *:443>
263
DocumentRoot "/var/www/cheapmusic/www"
264
ServerName www.dev.findcheapmusic.com
265
ServerAlias dev.findcheapmusic.com
197 - 266
Protocols h2 http/1.1
192 - 267
 
268
ErrorDocument 403 /index.php
269
ErrorDocument 404 /index.php
270
 
271
ErrorLog logs/ssl_error_log
272
TransferLog logs/ssl_access_log
273
LogLevel warn
274
 
275
# HSTS (31536000 seconds = 1 year)
276
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
277
# Prevent browsers from incorrectly detecting non-scripts as scripts
278
Header always set X-Content-Type-Options nosniff
279
# Cors
280
Header always set Access-Control-Allow-Origin "*"
281
# Disable unsafe inline/eval, only allow loading of resources (images, fonts, scripts, etc.) over https
282
###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'"
283
# Disable referrers for browsers that don't support strict-origin-when-cross-origin; Uses strict-origin-when-cross-origin for browsers that do
284
Header always set Referrer-Policy "no-referrer"
285
# Only allow my site to frame itself
286
#add above# Header always add Content-Security-Policy "frame-ancestors 'self'"
287
Header always set X-Frame-Options SAMEORIGIN
288
# XSS Protection
289
Header set X-XSS-Protection "1; mode=block"
290
# Redirect all non-www access to www
291
RewriteEngine On
292
RewriteCond %{HTTP_HOST} !^www\. [NC]
293
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
294
 
295
SSLEngine on
296
# intermediate configuration
297
SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
298
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
299
SSLHonorCipherOrder     off
300
 
301
SSLCertificateFile /etc/letsencrypt/live/dev.findcheapmusic.com/cert.pem
302
SSLCertificateKeyFile /etc/letsencrypt/live/dev.findcheapmusic.com/privkey.pem
303
SSLCertificateChainFile /etc/letsencrypt/live/dev.findcheapmusic.com/chain.pem
304
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
305
    SSLOptions +StdEnvVars
306
</Files>
307
<Directory "/var/www/cgi-bin">
308
    SSLOptions +StdEnvVars
309
</Directory>
310
SetEnvIf User-Agent ".*MSIE.*" \
311
         nokeepalive ssl-unclean-shutdown \
312
         downgrade-1.0 force-response-1.0
313
CustomLog logs/ssl_request_log \
314
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
315
</VirtualHost>
316
 
317
 
318
<VirtualHost *:443>
319
DocumentRoot "/var/www/archerygear"
320
ServerName www.dev.archerygearonline.com
321
ServerAlias dev.archerygearonline.com
197 - 322
Protocols h2 http/1.1
192 - 323
 
324
ErrorDocument 403 /index.html
325
ErrorDocument 404 /index.html
326
 
327
ErrorLog logs/ssl_error_log
328
TransferLog logs/ssl_access_log
329
LogLevel warn
330
 
331
# HSTS (31536000 seconds = 1 year)
332
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
333
# Prevent browsers from incorrectly detecting non-scripts as scripts
334
Header always set X-Content-Type-Options nosniff
335
# Cors
336
Header always set Access-Control-Allow-Origin "*"
337
# CSP calculated by FF Addon Laboratory
338
#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'"
339
# Disable referrers for browsers that don't support strict-origin-when-cross-origin; Uses strict-origin-when-cross-origin for browsers that do
340
Header always set Referrer-Policy "no-referrer"
341
# Only allow my site to frame itself
342
#add above# Header always add Content-Security-Policy "frame-ancestors 'self'"
343
Header always set X-Frame-Options SAMEORIGIN
344
# XSS Protection
345
Header set X-XSS-Protection "1; mode=block"
346
# Redirect all non-www access to www
347
RewriteEngine On
348
RewriteCond %{HTTP_HOST} !^www\. [NC]
349
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
350
 
351
SSLEngine on
352
# intermediate configuration
353
SSLProtocol             all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
354
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
355
SSLHonorCipherOrder     off
356
 
357
SSLCertificateFile /etc/letsencrypt/live/dev.archerygearonline.com/cert.pem
358
SSLCertificateKeyFile /etc/letsencrypt/live/dev.archerygearonline.com/privkey.pem
359
SSLCertificateChainFile /etc/letsencrypt/live/dev.archerygearonline.com/chain.pem
360
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
361
    SSLOptions +StdEnvVars
362
</Files>
363
<Directory "/var/www/cgi-bin">
364
    SSLOptions +StdEnvVars
365
</Directory>
366
SetEnvIf User-Agent ".*MSIE.*" \
367
         nokeepalive ssl-unclean-shutdown \
368
         downgrade-1.0 force-response-1.0
369
CustomLog logs/ssl_request_log \
370
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
371
</VirtualHost>