source: main/adopters/uset/trunk/src/main/reverse_proxy/extra/httpd-ssl.conf @ 18316

Last change on this file since 18316 was 18316, checked in by Paul Leo, 4 years ago

Removed ssl and keys, updated httpd-ssl.conf and httpd.conf

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