source: main/adopters/md/trunk/src/main/reverse_proxy/conf/extra/httpd-ssl.conf @ 22349

Last change on this file since 22349 was 22349, checked in by Paul Leo, 19 months ago

Updated Web Server, New Conf Files

File size: 15.4 KB
Line 
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 detailed information about these
5# directives see <URL:http://httpd.apache.org/docs/2.4/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# Required modules: mod_log_config, mod_setenvif, mod_ssl,
12#          socache_shmcb_module (for default value of SSLSessionCache)
13
14#
15# Pseudo Random Number Generator (PRNG):
16# Configure one or more sources to seed the PRNG of the SSL library.
17# The seed data should be of good random quality.
18# WARNING! On some platforms /dev/random blocks if not enough entropy
19# is available. This means you then cannot use the /dev/random device
20# because it would lead to very long connection times (as long as
21# it requires to make more entropy available). But usually those
22# platforms additionally provide a /dev/urandom device which doesn't
23# block. So, if available, use this one instead. Read the mod_ssl User
24# Manual for more details.
25#
26#SSLRandomSeed startup file:/dev/random  512
27#SSLRandomSeed startup file:/dev/urandom 512
28#SSLRandomSeed connect file:/dev/random  512
29#SSLRandomSeed connect file:/dev/urandom 512
30
31
32#
33# When we also provide SSL we have to listen to the
34# standard HTTP port (see above) and to the HTTPS port
35#
36Listen 443
37
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#   SSL Cipher Suite:
46#   List the ciphers that the client is permitted to negotiate,
47#   and that httpd will negotiate as the client of a proxied server.
48#   See the OpenSSL documentation for a complete list of ciphers, and
49#   ensure these follow appropriate best practices for this deployment.
50#   httpd 2.2.30, 2.4.13 and later force-disable aNULL, eNULL and EXP ciphers,
51#   while OpenSSL disabled these by default in 0.9.8zf/1.0.0r/1.0.1m/1.0.2a.
52#### ORIGINAL as provided by Apache
53#SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
54#SSLProxyCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
55#### WHAT WAS ON Maryland Reverse Proxy
56#### SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
57#### SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
58#### Suggested by Apache SSL/TLS Strong Encryption How-To
59#### SSLCipherSuite HIGH:!aNULL:!MD5
60#### SSLProxyCipherSuite HIGH:!aNULL:!MD5
61#### from https://www.leaderssl.com/news/471-how-to-disable-outdated-versions-of-ssl-tls-in-apache
62#### SSLCipherSuite HIGH:!aNULL:!MD5:!3DES
63#### SSLProxyCipherSuite HIGH:!aNULL:!MD5:!3DES
64#### This From last entry https://serverfault.com/questions/848177/how-can-i-disable-tls-1-0-and-1-1-in-apache
65SSLCipherSuite HIGH:!kRSA:!ADH:!eNULL:!LOW:!EXP:!MD5:!3DES
66SSLProxyCipherSuite HIGH:!kRSA:!ADH:!eNULL:!LOW:!EXP:!MD5:!3DES
67
68#  By the end of 2016, only TLSv1.2 ciphers should remain in use.
69#  Older ciphers should be disallowed as soon as possible, while the
70#  kRSA ciphers do not offer forward secrecy.  These changes inhibit
71#  older clients (such as IE6 SP2 or IE8 on Windows XP, or other legacy
72#  non-browser tooling) from successfully connecting. 
73#
74#  To restrict mod_ssl to use only TLSv1.2 ciphers, and disable
75#  those protocols which do not support forward secrecy, replace
76#  the SSLCipherSuite and SSLProxyCipherSuite directives above with
77#  the following two directives, as soon as practical.
78# SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
79# SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
80
81#   User agents such as web browsers are not configured for the user's
82#   own preference of either security or performance, therefore this
83#   must be the prerogative of the web server administrator who manages
84#   cpu load versus confidentiality, so enforce the server's cipher order.
85SSLHonorCipherOrder On
86
87#   SSL Protocol support:
88#   List the protocol versions which clients are allowed to connect with.
89#   Disable SSLv3 by default (cf. RFC 7525 3.1.1).  TLSv1 (1.0) should be
90#   disabled as quickly as practical.  By the end of 2016, only the TLSv1.2
91#   protocol or later should remain in use.
92SSLProtocol +TLSv1.2 +TLSv1.3
93SSLProxyProtocol +TLSv1.2 +TLSv1.3
94
95#   Pass Phrase Dialog:
96#   Configure the pass phrase gathering process.
97#   The filtering dialog program (`builtin' is an internal
98#   terminal dialog) has to provide the pass phrase on stdout.
99SSLPassPhraseDialog  builtin
100
101#   Inter-Process Session Cache:
102#   Configure the SSL Session Cache: First the mechanism
103#   to use and second the expiring timeout (in seconds).
104#SSLSessionCache         "dbm:${SRVROOT}/logs/ssl_scache"
105SSLSessionCache        "shmcb:${SRVROOT}/logs/ssl_scache(512000)"
106SSLSessionCacheTimeout  300
107
108#   OCSP Stapling (requires OpenSSL 0.9.8h or later)
109#
110#   This feature is disabled by default and requires at least
111#   the two directives SSLUseStapling and SSLStaplingCache.
112#   Refer to the documentation on OCSP Stapling in the SSL/TLS
113#   How-To for more information.
114#
115#   Enable stapling for all SSL-enabled servers:
116#SSLUseStapling On
117
118#   Define a relatively small cache for OCSP Stapling using
119#   the same mechanism that is used for the SSL session cache
120#   above.  If stapling is used with more than a few certificates,
121#   the size may need to be increased.  (AH01929 will be logged.)
122#SSLStaplingCache "shmcb:${SRVROOT}/logs/ssl_stapling(32768)"
123
124#   Seconds before valid OCSP responses are expired from the cache
125#SSLStaplingStandardCacheTimeout 3600
126
127#   Seconds before invalid OCSP responses are expired from the cache
128#SSLStaplingErrorCacheTimeout 600
129
130##
131## SSL Virtual Host Context
132##
133
134<VirtualHost _default_:443>
135
136#   General setup for the virtual host
137DocumentRoot "${SRVROOT}/htdocs"
138#ServerName ibisinternal:443
139ServerName ibis.health.maryland.gov:443
140ServerAdmin mdh.brfss@maryland.gov
141ErrorLog "|C:/Apache24.46/bin/rotatelogs.exe -l C:/Apache24.46/logs/SSL_error_log.%Y-%m-%d.log 10MB"
142#CustomLog "|C:/Apache24.46/bin/rotatelogs.exe -l C:/Apache24.46/logs/accesslog.%Y-%m-%d-%H-%M-%S.log 10  " combinedio
143#TransferLog "${SRVROOT}/logs/access.log"
144TransferLog "|C:/Apache24.46/bin/rotatelogs.exe -l C:/Apache24.46/logs/access.%Y-%m-%d.log 86400"
145
146
147#   SSL Engine Switch:
148#   Enable/Disable SSL for this virtual host.
149SSLEngine on
150SSLProxyEngine on
151
152SSLProxyVerify none
153SSLProxyCheckPeerName off
154SSLProxyCheckPeerCN off
155SSLProxyCheckPeerExpire off
156
157#   Server Certificate:
158#   Point SSLCertificateFile at a PEM encoded certificate.  If
159#   the certificate is encrypted, then you will be prompted for a
160#   pass phrase.  Note that a kill -HUP will prompt again.  Keep
161#   in mind that if you have both an RSA and a DSA certificate you
162#   can configure both in parallel (to also allow the use of DSA
163#   ciphers, etc.)
164#   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
165#   require an ECC certificate which can also be configured in
166#   parallel.
167#SSLCertificateFile "${SRVROOT}/conf/server-dsa.crt"
168#SSLCertificateFile "${SRVROOT}/conf/server-ecc.crt"
169#SSLCertificateFile "${SRVROOT}/conf/ibis/ssl_certificate.crt"
170SSLCertificateFile "C:/SSL/MDIBIS2021/ibis_health_maryland_gov.crt"
171
172
173#   Server Private Key:
174#   If the key is not combined with the certificate, use this
175#   directive to point at the key file.  Keep in mind that if
176#   you've both a RSA and a DSA private key you can configure
177#   both in parallel (to also allow the use of DSA ciphers, etc.)
178#   ECC keys, when in use, can also be configured in parallel
179#SSLCertificateKeyFile "${SRVROOT}/conf/server-dsa.key"
180#SSLCertificateKeyFile "${SRVROOT}/conf/server-ecc.key"
181#SSLCertificateKeyFile "${SRVROOT}/conf/ibis/server.key"
182SSLCertificateKeyFile "C:/SSL/MDIBIS2021/server.key"
183
184#   Server Certificate Chain:
185#   Point SSLCertificateChainFile at a file containing the
186#   concatenation of PEM encoded CA certificates which form the
187#   certificate chain for the server certificate. Alternatively
188#   the referenced file can be the same as SSLCertificateFile
189#   when the CA certificates are directly appended to the server
190#   certificate for convenience.
191#SSLCertificateChainFile "${SRVROOT}/conf/ibis/IntermediateCA.crt"
192SSLCertificateChainFile "C:/SSL/MDIBIS2021/DigiCertCA.crt"
193
194#   Certificate Authority (CA):
195#   Set the CA certificate verification path where to find CA
196#   certificates for client authentication or alternatively one
197#   huge file containing all of them (file must be PEM encoded)
198#   Note: Inside SSLCACertificatePath you need hash symlinks
199#         to point to the certificate files. Use the provided
200#         Makefile to update the hash symlinks after changes.
201#SSLCACertificatePath "${SRVROOT}/conf/ssl.crt"
202#SSLCACertificateFile "${SRVROOT}/conf/ibis/IntermediateCA.crt"
203
204#   Certificate Revocation Lists (CRL):
205#   Set the CA revocation path where to find CA CRLs for client
206#   authentication or alternatively one huge file containing all
207#   of them (file must be PEM encoded).
208#   The CRL checking mode needs to be configured explicitly
209#   through SSLCARevocationCheck (defaults to "none" otherwise).
210#   Note: Inside SSLCARevocationPath you need hash symlinks
211#         to point to the certificate files. Use the provided
212#         Makefile to update the hash symlinks after changes.
213#SSLCARevocationPath "${SRVROOT}/conf/ssl.crl"
214#SSLCARevocationFile "${SRVROOT}/conf/ssl.crl/ca-bundle.crl"
215#SSLCARevocationCheck chain
216
217#   Client Authentication (Type):
218#   Client certificate verification type and depth.  Types are
219#   none, optional, require and optional_no_ca.  Depth is a
220#   number which specifies how deeply to verify the certificate
221#   issuer chain before deciding the certificate is not valid.
222#SSLVerifyClient require
223#SSLVerifyDepth  10
224
225#   TLS-SRP mutual authentication:
226#   Enable TLS-SRP and set the path to the OpenSSL SRP verifier
227#   file (containing login information for SRP user accounts).
228#   Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for
229#   detailed instructions on creating this file. Example:
230#   "openssl srp -srpvfile ${SRVROOT}/conf/passwd.srpv -add username"
231#SSLSRPVerifierFile "${SRVROOT}/conf/passwd.srpv"
232
233#   Access Control:
234#   With SSLRequire you can do per-directory access control based
235#   on arbitrary complex boolean expressions containing server
236#   variable checks and other lookup directives.  The syntax is a
237#   mixture between C and Perl.  See the mod_ssl documentation
238#   for more details.
239#<Location />
240#SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
241#            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
242#            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
243#            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
244#            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
245#           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
246#</Location>
247
248#   SSL Engine Options:
249#   Set various options for the SSL engine.
250#   o FakeBasicAuth:
251#     Translate the client X.509 into a Basic Authorisation.  This means that
252#     the standard Auth/DBMAuth methods can be used for access control.  The
253#     user name is the `one line' version of the client's X.509 certificate.
254#     Note that no password is obtained from the user. Every entry in the user
255#     file needs this password: `xxj31ZMTZzkVA'.
256#   o ExportCertData:
257#     This exports two additional environment variables: SSL_CLIENT_CERT and
258#     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
259#     server (always existing) and the client (only existing when client
260#     authentication is used). This can be used to import the certificates
261#     into CGI scripts.
262#   o StdEnvVars:
263#     This exports the standard SSL/TLS related `SSL_*' environment variables.
264#     Per default this exportation is switched off for performance reasons,
265#     because the extraction step is an expensive operation and is usually
266#     useless for serving static content. So one usually enables the
267#     exportation for CGI and SSI requests only.
268#   o StrictRequire:
269#     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
270#     under a "Satisfy any" situation, i.e. when it applies access is denied
271#     and no other module can change it.
272#   o OptRenegotiate:
273#     This enables optimized SSL connection renegotiation handling when SSL
274#     directives are used in per-directory context.
275#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
276<FilesMatch "\.(cgi|shtml|phtml|php)$">
277    SSLOptions +StdEnvVars
278</FilesMatch>
279<Directory "${SRVROOT}/cgi-bin">
280    SSLOptions +StdEnvVars
281</Directory>
282
283#   SSL Protocol Adjustments:
284#   The safe and default but still SSL/TLS standard compliant shutdown
285#   approach is that mod_ssl sends the close notify alert but doesn't wait for
286#   the close notify alert from client. When you need a different shutdown
287#   approach you can use one of the following variables:
288#   o ssl-unclean-shutdown:
289#     This forces an unclean shutdown when the connection is closed, i.e. no
290#     SSL close notify alert is sent or allowed to be received.  This violates
291#     the SSL/TLS standard but is needed for some brain-dead browsers. Use
292#     this when you receive I/O errors because of the standard approach where
293#     mod_ssl sends the close notify alert.
294#   o ssl-accurate-shutdown:
295#     This forces an accurate shutdown when the connection is closed, i.e. a
296#     SSL close notify alert is send and mod_ssl waits for the close notify
297#     alert of the client. This is 100% SSL/TLS standard compliant, but in
298#     practice often causes hanging connections with brain-dead browsers. Use
299#     this only for browsers where you know that their SSL implementation
300#     works correctly.
301#   Notice: Most problems of broken clients are also related to the HTTP
302#   keep-alive facility, so you usually additionally want to disable
303#   keep-alive for those clients, too. Use variable "nokeepalive" for this.
304#   Similarly, one has to force some clients to use HTTP/1.0 to workaround
305#   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
306#   "force-response-1.0" for this.
307BrowserMatch "MSIE [2-5]" \
308         nokeepalive ssl-unclean-shutdown \
309         downgrade-1.0 force-response-1.0
310
311#   Per-Server Logging:
312#   The home of a custom SSL log file. Use this when you want a
313#   compact non-error SSL logfile on a virtual host basis.
314#CustomLog "${SRVROOT}/logs/ssl_request.log" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
315#####Uncomment next two lines to see ssl_request.log which shows SSL protocol and CIPHer
316#LogFormat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" sslrequest
317#CustomLog "|C:/Apache24.46/bin/rotatelogs.exe -l C:/Apache24.46/logs/ssl_request.%Y-%m-%d.log  86400" sslrequest                 
318                 
319                 
320# Reverse proxy for this virtual host
321
322    ProxyPreserveHost On
323    ProxyRequests off
324       
325        <Proxy *>
326                Require all granted 
327        </Proxy>
328       
329    # Servers to proxy the connection, or;
330    # List of application servers:
331    # Usage:
332    # ProxyPass / http://[IP Addr.]:[port]/
333    # ProxyPassReverse / http://[IP Addr.]:[port]/
334       
335        #ProxyPass /user/Login.html http://10.32.0.13/user/Login.html
336        #ProxyPassReverse /user/Login.html http://10.32.0.13/user/Login.html
337    ProxyPass / https://10.197.23.123/
338    ProxyPassReverse / https://10.197.23.123/
339
340</VirtualHost>                                 
Note: See TracBrowser for help on using the repository browser.