Change docs.mit.edu to a flask app
[sysconfig/apache2.git] / sites-available / acc-858-test
1 <IfModule mod_ssl.c>
2 <VirtualHost 18.208.0.229:443>
3         ServerAdmin webmaster@dehnerts.com
4         ServerName acc-858-test.mit.edu
5
6         DocumentRoot /var/www/default
7
8         <Location />
9         deny from all
10         </Location>
11
12         #   SSL Engine Switch:
13         #   Enable/Disable SSL for this virtual host.
14         SSLEngine on
15
16         #   A self-signed (snakeoil) certificate can be created by installing
17         #   the ssl-cert package. See
18         #   /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
19         #   If both key and certificate are stored in the same file, only the
20         #   SSLCertificateFile directive is needed.
21         SSLCertificateFile    /var/tmp/certs/cur.pem
22         SSLCertificateKeyFile /var/tmp/certs/cur.key
23
24         #   Server Certificate Chain:
25         #   Point SSLCertificateChainFile at a file containing the
26         #   concatenation of PEM encoded CA certificates which form the
27         #   certificate chain for the server certificate. Alternatively
28         #   the referenced file can be the same as SSLCertificateFile
29         #   when the CA certificates are directly appended to the server
30         #   certificate for convinience.
31         #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
32
33         #   Certificate Authority (CA):
34         #   Set the CA certificate verification path where to find CA
35         #   certificates for client authentication or alternatively one
36         #   huge file containing all of them (file must be PEM encoded)
37         #   Note: Inside SSLCACertificatePath you need hash symlinks
38         #         to point to the certificate files. Use the provided
39         #         Makefile to update the hash symlinks after changes.
40         #SSLCACertificatePath /etc/ssl/certs/
41         #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
42
43         #   Certificate Revocation Lists (CRL):
44         #   Set the CA revocation path where to find CA CRLs for client
45         #   authentication or alternatively one huge file containing all
46         #   of them (file must be PEM encoded)
47         #   Note: Inside SSLCARevocationPath you need hash symlinks
48         #         to point to the certificate files. Use the provided
49         #         Makefile to update the hash symlinks after changes.
50         #SSLCARevocationPath /etc/apache2/ssl.crl/
51         #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
52
53         #   Client Authentication (Type):
54         #   Client certificate verification type and depth.  Types are
55         #   none, optional, require and optional_no_ca.  Depth is a
56         #   number which specifies how deeply to verify the certificate
57         #   issuer chain before deciding the certificate is not valid.
58         #SSLVerifyClient require
59         #SSLVerifyDepth  10
60
61         #   Access Control:
62         #   With SSLRequire you can do per-directory access control based
63         #   on arbitrary complex boolean expressions containing server
64         #   variable checks and other lookup directives.  The syntax is a
65         #   mixture between C and Perl.  See the mod_ssl documentation
66         #   for more details.
67         #<Location />
68         #SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
69         #            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
70         #            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
71         #            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
72         #            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
73         #           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
74         #</Location>
75
76         #   SSL Engine Options:
77         #   Set various options for the SSL engine.
78         #   o FakeBasicAuth:
79         #     Translate the client X.509 into a Basic Authorisation.  This means that
80         #     the standard Auth/DBMAuth methods can be used for access control.  The
81         #     user name is the `one line' version of the client's X.509 certificate.
82         #     Note that no password is obtained from the user. Every entry in the user
83         #     file needs this password: `xxj31ZMTZzkVA'.
84         #   o ExportCertData:
85         #     This exports two additional environment variables: SSL_CLIENT_CERT and
86         #     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
87         #     server (always existing) and the client (only existing when client
88         #     authentication is used). This can be used to import the certificates
89         #     into CGI scripts.
90         #   o StdEnvVars:
91         #     This exports the standard SSL/TLS related `SSL_*' environment variables.
92         #     Per default this exportation is switched off for performance reasons,
93         #     because the extraction step is an expensive operation and is usually
94         #     useless for serving static content. So one usually enables the
95         #     exportation for CGI and SSI requests only.
96         #   o StrictRequire:
97         #     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
98         #     under a "Satisfy any" situation, i.e. when it applies access is denied
99         #     and no other module can change it.
100         #   o OptRenegotiate:
101         #     This enables optimized SSL connection renegotiation handling when SSL
102         #     directives are used in per-directory context.
103         #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
104         <FilesMatch "\.(cgi|shtml|phtml|php)$">
105                 SSLOptions +StdEnvVars
106         </FilesMatch>
107         <Directory /usr/lib/cgi-bin>
108                 SSLOptions +StdEnvVars
109         </Directory>
110
111         #   SSL Protocol Adjustments:
112         #   The safe and default but still SSL/TLS standard compliant shutdown
113         #   approach is that mod_ssl sends the close notify alert but doesn't wait for
114         #   the close notify alert from client. When you need a different shutdown
115         #   approach you can use one of the following variables:
116         #   o ssl-unclean-shutdown:
117         #     This forces an unclean shutdown when the connection is closed, i.e. no
118         #     SSL close notify alert is send or allowed to received.  This violates
119         #     the SSL/TLS standard but is needed for some brain-dead browsers. Use
120         #     this when you receive I/O errors because of the standard approach where
121         #     mod_ssl sends the close notify alert.
122         #   o ssl-accurate-shutdown:
123         #     This forces an accurate shutdown when the connection is closed, i.e. a
124         #     SSL close notify alert is send and mod_ssl waits for the close notify
125         #     alert of the client. This is 100% SSL/TLS standard compliant, but in
126         #     practice often causes hanging connections with brain-dead browsers. Use
127         #     this only for browsers where you know that their SSL implementation
128         #     works correctly.
129         #   Notice: Most problems of broken clients are also related to the HTTP
130         #   keep-alive facility, so you usually additionally want to disable
131         #   keep-alive for those clients, too. Use variable "nokeepalive" for this.
132         #   Similarly, one has to force some clients to use HTTP/1.0 to workaround
133         #   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
134         #   "force-response-1.0" for this.
135         BrowserMatch ".*MSIE.*" \
136                 nokeepalive ssl-unclean-shutdown \
137                 downgrade-1.0 force-response-1.0
138 </VirtualHost>
139 </IfModule>