You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2019/06/25 11:14:38 UTC

svn commit: r1862052 - /httpd/httpd/trunk/docs/manual/mod/mod_md.xml

Author: icing
Date: Tue Jun 25 11:14:38 2019
New Revision: 1862052

URL: http://svn.apache.org/viewvc?rev=1862052&view=rev
Log:
 mod_md: updated documenation with new directives and chapters about wildcards and monitoring.

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_md.xml

Modified: httpd/httpd/trunk/docs/manual/mod/mod_md.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_md.xml?rev=1862052&r1=1862051&r2=1862052&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_md.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_md.xml Tue Jun 25 11:14:38 2019
@@ -33,12 +33,19 @@
     <summary>
         <p>
         This module manages common properties of domains for one or more virtual hosts. 
-        Specifically it can use the ACME protocol
-        (<a href="https://datatracker.ietf.org/doc/draft-ietf-acme-acme/">RFC Draft</a>) 
-        to automate certificate provisioning. These will be configured for managed domains and
-        their virtual hosts automatically. This includes renewal of certificates before they
-        expire. The most famous Certificate Authority currently implementing the ACME protocol
-        is <a href="https://letsencrypt.org/">Let's Encrypt</a>.</p>
+        Its main feature is the use of the ACME protocol
+        (<a href="https://tools.ietf.org/html/rfc8555">RFC 8555</a>) 
+        to automate certificate provisioning. Certificates will be renewed 
+        by the module ahead of their expiration to account for disruption in internet
+        services. There are ways to monitor the status of all Managed Domains
+        and configurations that will run your own notification commands on renewal,
+        expiration and errors.
+        </p>
+        <p>
+        The default ACME Certificate Authority is 
+        <a href="https://letsencrypt.org/">Let's Encrypt</a>, but it is possible 
+        to configure another CA that supports the protocol.
+        </p>
         
         <note type="warning"><title>Warning</title>
             <p>This module is experimental. Its behaviors, directives, and 
@@ -79,17 +86,17 @@ MDomain example.org
         <p>
             This module requires <module>mod_watchdog</module> to be loaded as well.
         </p><p>
-            Certificate signup and renewal with Let's Encrypt requires your server to be
+            Certificate sign-up and renewal with Let's Encrypt requires your server to be
             reachable on port 80 (http:) from the outside. The alternative method over
             port 443 (https:) is currently disabled for security reasons (status from
             2018-01-14).
         </p><p>
             The module will select from the methods offered by Let's Encrypt. If LE decides
-            at one point in the future, to re-enable it again, <module>mod_md</module> will
+            at one point in the future, to re-enable it again, mod_md will
             use it when suitable.
         </p><p>
             But for now, only the port 80 variant is available (termed "http-01"). Only
-            when LE can reach your server on port 80 will <module>mod_md</module> work for
+            when LE can reach your server on port 80 will mod_md work for
             you. For now, at least.
         </p><p>
             If you do not want to offer any sites on port 80 any more, you may leave it open
@@ -99,6 +106,120 @@ MDomain example.org
             from Let's Encrypt. 
         </p>
         </note>
+
+        <note><title>Wildcard Certificates</title>
+        <p>
+            Wildcard certificates are possible with version 2.x of `mod_md``. But they are 
+            not straight-forward. Let's Encrypt requires the `dns-01` challenge verification 
+            for those. No other is considered good enough.
+        </p><p>
+            The difficulty here is that Apache cannot do that on its own. (which is also 
+            a security benefit, since corrupting a web server or the communication path to 
+            it is the scenario `dns-01` protects against). As the name implies, `dns-01` 
+            requires you to show some specific DNS records for your domain that contain 
+            some challenge data. So you need to _write_ your domain's DNS records.
+        </p><p>
+            If you know how to do that, you can integrated this with `mod_md`. Let's 
+            say you have a script for that in `/usr/bin/acme-setup-dns` you configure 
+            Apache with:
+        </p>
+        <highlight language="config">
+MDChallengeDns01 /usr/bin/acme-setup-dns
+        </highlight>
+        <p>
+            and Apache will call this script when it needs to setup/teardown a DNS challenge 
+            record for a domain. 
+        </p><p>
+            Assuming you want a certificate for `*.mydomain.com`, mod_md will call:
+        </p>
+        <highlight language="config">
+/usr/bin/acme-setup-dns setup mydomain.com challenge-data
+# this needs to remove all existing DNS TXT records for 
+# _acme-challenge.mydomain.com and create a new one with 
+# content "challenge-data"
+        </highlight>
+        <p>
+            and afterwards it will call
+        </p>
+        <highlight language="config">
+/usr/bin/acme-setup-dns teardown mydomain.com
+# this needs to remove all existing DNS TXT records for 
+# _acme-challenge.mydomain.com
+        </highlight>
+        </note>
+
+        <note><title>Monitoring</title>
+            <p>
+                Apache has a standard module for monitoring: <module>mod_status</module>.
+                mod_md contributes a section and makes monitoring your 
+                domains easy.
+            </p><p>
+                You see all your MDs listed alphabetically, the domain names they contain, 
+                an overall status, expiration times and specific settings. The settings 
+                show your selection of renewal times (or the default), the CA that is used, 
+                etc.
+            </p><p>
+                The 'Renewal' column will show activity and error descriptions for certificate 
+                renewals. This should make life easier for people to find out if everything 
+                is all right or what went wrong.
+            </p><p>
+                If there is an error with an MD it will be shown here as well. This let's 
+                you assess problems without digging through your server logs.
+            </p><p>
+                There is also a new 'md-status' handler available to give you the MD information 
+                from 'server-status' in JSON format. You configure it as
+            </p>
+            <highlight language="config">
+&lt;Location "/md-status">
+  SetHandler md-status
+&lt;/Location>
+            </highlight>
+            <p>
+                on your server. As with 'server-status' you will want to add 
+                authorization for this. 
+            </p><p>
+                If you just want to check the JSON status of a specific domain, simply append 
+                that to your status url:
+            </p>
+            <highlight language="config">
+> curl https://&lt;yourhost>/md-status/another-domain.org
+{
+  "name": "another-domain.org",
+  "domains": [
+    "another-domain.org",
+    "www.another-domain.org"
+  ],
+  ...
+            </highlight>
+            <p>
+                This JSON status also shows a log of activities when domains are renewed:
+            </p>
+            <highlight language="config">
+{
+"when": "Wed, 19 Jun 2019 14:45:58 GMT",
+"type": "progress", "detail": "The certificate for the managed domain has been renewed successfully and can be used. A graceful server restart now is recommended."
+},{
+"when": "Wed, 19 Jun 2019 14:45:58 GMT",
+"type": "progress", "detail": "Retrieving certificate chain for test-901-003-1560955549.org"
+},{
+"when": "Wed, 19 Jun 2019 14:45:58 GMT",
+"type": "progress", "detail": "Waiting for finalized order to become valid"
+},{
+"when": "Wed, 19 Jun 2019 14:45:50 GMT",
+"type": "progress", "detail": "Submitting CSR to CA for test-901-003-1560955549.org"
+},
+...
+            </highlight>
+            <p>
+                You will also find this information in the file `job.json` in your staging and, 
+                when activated, domains directory. This allows you to inspect these at
+                any later point in time as well. 
+            </p><p>
+                In addition, there is <directive module="mod_md">MDCertificateStatus</directive> which
+                gives access to relevant certificate information in JSON format.
+            </p>
+        </note>
+
     </summary>
     
     <directivesynopsis>
@@ -112,7 +233,7 @@ MDomain example.org
         <usage>
             <p>
                 All the names in the list are managed as one Managed Domain (MD). 
-                <module>mod_md</module> will request one single certificate that is valid for all these names. This
+                mod_md will request one single certificate that is valid for all these names. This
                 directive uses the global settings (see other MD directives below). If you
                 need specific settings for one MD, use
                 the <directive module="mod_md" type="section">MDomainSet</directive>.
@@ -126,14 +247,13 @@ MDomain example.org
                 changes in its service or status of your certificates.
             </p><p>
                 The second setting, <directive module="mod_md">MDCertificateAgreement</directive>, 
-                is the URL of the Terms of Service of the CA. When you configure the URL, 
-                you confirm that you have read and agree to the terms described in the linked 
-                document. Before you do that, the CA will  not hand out certificates to you.
+                should have the value "accepted". By specifying this, you confirm that your
+                accept the Terms of Service of the CA. 
             </p>
             <example><title>Example</title>
                 <highlight language="config">
 ServerAdmin mailto:admin@example.org
-MDCertificateAgreement https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
+MDCertificateAgreement accepted
 MDomain example.org www.example.org
 
 &lt;VirtualHost *:443&gt;
@@ -155,7 +275,7 @@ MDomain example.org www.example.org
                 There are two special names that you may use in this directive: 'manual'
                 and 'auto'. This determines if a Managed Domain shall have exactly the 
                 name list as is configured ('manual') or offer more convenience. With 'auto'
-                all names of a virtual host are added to a MD. Conventiently, 'auto' is also
+                all names of a virtual host are added to a MD. Conveniently, 'auto' is also
                 the default.
             </p>
             <example><title>Example</title>
@@ -201,46 +321,48 @@ MDomain example2.org auto
         
         <usage>
             <p>
-                This directive allows you to define a Managed Domain (MD) with specific
-                settings, different from the global MD* ones. For example, you can have
-                such an MD use another CA then Let's Encrypt, have its unique renewal duration
-                etc.
+                This is the directive <directive module="mod_md">MDomain</directive>
+                with the added possibility to add setting just for this MD. In fact,
+                you may also use "&lt;MDomain ..>" as a shortcut.
+            </p>
+            <p>
+                This allows you to configure an MD that uses another Certificate Authority,
+                have other renewal requirements, etc.
             </p>
             <example><title>Example</title>
                 <highlight language="config">
-&lt;MDomainSet sandbox.example.org&gt;
+&lt;MDomain sandbox.example.org&gt;
     MDCertificateAuthority   https://someotherca.com/ACME
-    MDCertificateAgreement   https://someotherca.com/terms/v_1.02.pdf
-&lt;/MDomainSet&gt;
+&lt;/MDomain&gt;
+                </highlight>
+            </example>
+        <p>
+            A common use case is to configure https: requirements separately for
+            your domains.
+        </p>
+            <example><title>Example</title>
+                <highlight language="config">
+&lt;MDomain example.org&gt;
+    MDRequireHttps temporary
+&lt;/MDomain&gt;
                 </highlight>
             </example>
-        <p>This is a specialized version of <directive module="mod_md">MDomain</directive>,
-        it should be used only when a fine grained configuration is required.
-        <directive module="mod_md">MDomain</directive> is the suggested choice
-        for the general use case.</p>
         </usage>
     </directivesynopsis>
 
     <directivesynopsis>
         <name>MDCertificateAgreement</name>
-        <description>The URL of the Terms-of-Service document, that the CA server requires you to accept.</description>
-        <syntax>MDCertificateAgreement <var>url-of-terms-of-service</var></syntax>
+        <description>You confirm that you accepted the Terms of Service of the Certificate
+        Authority.</description>
+        <syntax>MDCertificateAgreement accepted</syntax>
         <contextlist>
             <context>server config</context>
         </contextlist>
         <usage>
-            <p>When you use <module>mod_md</module> to obtain a certificate, you become a customer of the CA (e.g. Let's Encrypt). That means you need to read and agree to their Terms of Service, 
+            <p>When you use mod_md to obtain a certificate, you become a customer of the CA (e.g. Let's Encrypt). That means you need to read and agree to their Terms of Service, 
             so that you understand what they offer and what they might exclude or require from you. 
-            <module>mod_md</module> cannot, by itself, agree to such a thing. 
+            mod_md cannot, by itself, agree to such a thing. 
             </p>
-            <p>In case of Let's Encrypt, their current <a href="https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf">Terms of Service are here</a>. 
-            Those terms might (and probably will) change over time. So, the certificate renewal might require you to update this agreement URL.</p>
-            <example><title>Example</title>
-                <highlight language="config">
-MDCertificateAgreement https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
-MDomain example.org www.example.org mail.example.org
-                </highlight>
-            </example>
         </usage>
     </directivesynopsis>
 
@@ -248,7 +370,7 @@ MDomain example.org www.example.org mail
         <name>MDCertificateAuthority</name>
         <description>The URL of the ACME Certificate Authority service.</description>
         <syntax>MDCertificateAuthority <var>url</var></syntax>
-        <default>MDCertificateAuthority https://acme-v01.api.letsencrypt.org/directory</default>
+        <default>MDCertificateAuthority https://acme-v02.api.letsencrypt.org/directory</default>
         <contextlist>
             <context>server config</context>
         </contextlist>
@@ -256,15 +378,19 @@ MDomain example.org www.example.org mail
             <p>
                 The URL where the CA offers its service.
             </p><p>
-                Let's Encrypt offers, right now, two such URLs. One for the real certificates and
-                one for testing (their staging area, at https://acme-staging.api.letsencrypt.org/directory).
-                In order to have <module>mod_md</module> use this testing service, configure your
-                server like this: 
+                Let's Encrypt offers, right now, four such URLs. Two for
+                the own legacy version of the ACME protocol, commonly named ACMEv1.
+                And two for the RFC 8555 version, named ACMEv2.
+            </p><p>
+                Each version has 2 endpoints, as their is a production endpoint and a
+                "staging" endpoint for testing. The testing endpoint works the same, but will
+                not give you certificates recognized by browsers. However, it also has
+                very relaxed rate limits. This allows testing of the service repeatedly
+                without you blocking yourself.
             </p>
             <example><title>LE Staging Setup</title>
                 <highlight language="config">
-MDCertificateAuthority https://acme-staging.api.letsencrypt.org/directory
-MDCertificateAgreement https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
+MDCertificateAuthority https://acme-staging-v02.api.letsencrypt.org/directory
                 </highlight>
             </example>
         </usage>
@@ -279,33 +405,55 @@ MDCertificateAgreement https://letsencry
             <context>server config</context>
         </contextlist>
         <usage>
-            <p>Specifies the protocol to use. Currently, only <code>ACME</code> is supported.</p>
+            <p>
+                Specifies the protocol to use. Currently, only <code>ACME</code> is supported.
+            </p>
         </usage>
     </directivesynopsis>
 
     <directivesynopsis>
         <name>MDDriveMode</name>
-        <description>Control when it is allowed to obtain/renew certificates.</description>
+        <description>former name of MDRenewMode.</description>
         <syntax>MDDriveMode always|auto|manual</syntax>
         <default>MDDriveMode auto</default>
         <contextlist>
             <context>server config</context>
         </contextlist>
         <usage>
-            <p>In 'auto' mode, <module>mod_md</module> will <em>drive</em> a Managed Domain's
-            properties (e.g. certificate management) whenever necessary. When a MD is not used
-            in any virtual host, the module will do nothing. When a certificate is missing, it
-            will try to get one. When a certificate expires soon (see 
-            <directive module="mod_md">MDRenewWindow</directive>), it will
-            renew it.
-            </p><p>
-            In 'manual' mode, it is your duty to do all this. The module will provide the existing
-            certificate to <module>mod_ssl</module>, if available. But it will not contact the CA for signup/renewal.
-            This can be useful in clustered setups where you want just one node to perform
-            the driving.
-            </p><p>
-            The third mode 'always' is like 'auto', with the difference that
-            <module>mod_md</module> will not check if the MD is actually used. 
+            <p>This directive exists for backward compatibility as the old name for
+            <directive module="mod_md">MDRenewMode</directive>.
+            </p>
+        </usage>
+    </directivesynopsis>
+
+    <directivesynopsis>
+        <name>MDRenewMode</name>
+        <description>Controls if certificates shall be renewed.</description>
+        <syntax>MDRenewMode always|auto|manual</syntax>
+        <default>MDRenewMode auto</default>
+        <contextlist>
+            <context>server config</context>
+        </contextlist>
+        <usage>
+            <p>
+                In the default 'auto' mode, the module will do what makes most sense
+                of each Managed Domain. For a domain without any certificates, it will
+                obtain them from the Certificate Authority. 
+            </p>
+            <p>
+                However, if you have defined an MD that is not used by any of Apache's 
+                VirtualHosts, it will not bother. And for MDs with static certificate
+                files (see <directive module="mod_md">MDCertificateFile</directive>), 
+                it assumes that you have your own source, and will not renew them either.
+            </p>
+            <p>
+                You can override this default in either way. If you specify 'always',
+                the module will renew certificates for an MD, irregardless if the
+                domains are in use or if there are static files.
+            </p>
+            <p>
+                For the opposite effect, configure 'manual' and no renewal will
+                be attempted.
             </p>
         </usage>
     </directivesynopsis>
@@ -334,15 +482,15 @@ MDCertificateAgreement https://letsencry
         <usage>
             <p>
             Instead of listing all dns names on the same line, you may use
-            <directive>MDMember</directive> to add such names
+            <directive module="mod_md">MDMember</directive> to add such names
             to a managed domain.
             </p>
             <example><title>Example</title>
                 <highlight language="config">
-&lt;MDomainSet example.org&gt;
+&lt;MDomain example.org&gt;
     MDMember www.example.org
     MDMember mail.example.org
-&lt;/MDomainSet&gt;
+&lt;/MDomain&gt;
                 </highlight>
             </example>
             <p>
@@ -390,16 +538,17 @@ MDCertificateAgreement https://letsencry
 
     <directivesynopsis>
         <name>MDNotifyCmd</name>
-        <description>Run a program when Managed Domain are ready.</description>
+        <description>Run a program when a Managed Domain is ready.</description>
         <syntax>MDNotifyCmd <var>path</var> [ <var>args</var> ]</syntax>
         <contextlist>
             <context>server config</context>
         </contextlist>
         <usage>
-            <p>The configured executable is run when Managed Domains have signed up or
-            renewed their certificates. It is given the names of the processed MDs as
-            additional arguments (after the parameters specified here). It should 
-            return status code 0 to indicate that it has run successfully.
+            <p>
+                The configured executable is run when a Managed Domain has signed up or
+                renewed its certificate. It is given the name of the processed MD as
+                additional arguments (after the parameters specified here). It should 
+                return status code 0 to indicate that it has run successfully.
             </p>
         </usage>
     </directivesynopsis>
@@ -408,36 +557,44 @@ MDCertificateAgreement https://letsencry
         <name>MDPortMap</name>
         <description>Map external to internal ports for domain ownership verification.</description>
         <syntax>MDPortMap <var>map1</var> [ <var>map2</var> ]</syntax>
-        <default>MDPortMap 80:80 443:443</default>
+        <default>MDPortMap http:80 https:443</default>
         <contextlist>
             <context>server config</context>
         </contextlist>
         <usage>
             <p>
-                The ACME protocol provides two methods to verify domain ownership: one that uses
-                port 80 and one for port 443. If your server is not reachable by at least one
-                of the two, ACME will not work for you.
+                The ACME protocol provides two methods to verify domain ownership via
+                HTTP: one that uses 'http:' urls (port 80) and one for 'https:' urls
+                (port 443). If your server is not reachable by at least one
+                of the two, ACME may only work by configuring your DNS server,
+                see <directive module="mod_md">MDChallengeDns01</directive>.
             </p><p>
-                <module>mod_md</module> will look at your server configuration and try to figure
-                out which of those are available. Then it can select the proper ACME challenge
-                to create a certificate for your site.
-            </p><p>
-                However if you have some fancy port forwarding in place, your server may be
-                reachable from the Internet on port 443, but the local port that httpd uses is
-                another one. Your server might only listen on ports 5001 and 5002, but be reached
-                on ports 443 and 80. How should <module>mod_md</module> figure that one out?
+                On most public facing servers, 'http:' arrives on port 80 and
+                'https:' on port 443. The module checks the ports your Apache server
+                is listening on and assumes those are available. This means that
+                when your server does not listen on port 80, it assumes that
+                'http:' requests from the internet will not work.
             </p><p>
-                With <directive>MDPortMap</directive> you can tell it which 'Internet port'
-                corresponds to which local port.
+                This is a good guess, but it may be wrong. For example, your Apache
+                might listen to port 80, but your firewall might block it. 'http:' 
+                is only available in your intranet. So, the module will falsely assume
+                that Let's Encrypt can use 'http:' challenges with your server. This 
+                will then fail, because your firewall will drop those.
             </p>
             <example><title>Example</title>
                 <highlight language="config">
-MDPortMap 80:- 443:5002
+MDPortMap http:- https:8433
                 </highlight>
             </example>
             <p>
-                This example says that the server is not reachable on port 80 from the outside, but
-                local port 5002 is the one responding to https: requests.
+                The above example shows how you can specify that 'http:' requests from 
+                the internet will never arrive. In addition it says that 'https:' requests
+                will arrive on local port 8433.
+            </p><p>
+                This is necessary if you have port forwarding in place, your server may be
+                reachable from the Internet on port 443, but the local port that httpd uses is
+                another one. Your server might only listen on ports 8443 and 8000, but be reached
+                on ports 443 and 80 (from the internet).
             </p>
         </usage>
     </directivesynopsis>
@@ -486,10 +643,10 @@ MDPrivateKeys RSA 3072
         </contextlist>
         <usage>
             <p>
-            If the validity of the certificate falls below duration, <module>mod_md</module>
+            If the validity of the certificate falls below duration, mod_md
             will get a new signed certificate.
             </p><p>
-            Normally, certificates are valid for around 90 days and <module>mod_md</module> will renew 
+            Normally, certificates are valid for around 90 days and mod_md will renew 
             them the earliest 33% of their complete lifetime before they expire (so for 
             90 days validity, 30 days before it expires). If you think this is not what 
             you need, you can specify either the exact time, as in:
@@ -562,7 +719,7 @@ MDRequireHttps permanent
             <p>You can achieve the same with <module>mod_alias</module> and some
             <directive module="mod_alias">Redirect</directive> configuration,
             basically. If you do it yourself, please make sure to exclude the paths 
-            /.well-known/* from your redirection, otherwise <module>mod_md</module> 
+            /.well-known/* from your redirection, otherwise mod_md 
             might have trouble signing on new certificates.
             </p>
             <p>If you set this globally, it applies to all managed domains. If you want 
@@ -570,9 +727,9 @@ MDRequireHttps permanent
             </p>
             <example><title>Example</title>
                 <highlight language="config">
-&lt;MDomainSet xxx.yyy&gt;
+&lt;MDomain xxx.yyy&gt;
   MDRequireHttps temporary
-&lt;/MDomainSet&gt;
+&lt;/MDomain&gt;
                 </highlight>
             </example>
         </usage>
@@ -604,7 +761,7 @@ MDRequireHttps permanent
         <name>MDCAChallenges</name>
         <description>Type of ACME challenge used to prove domain ownership.</description>
         <syntax>MDCAChallenges <var>name</var> [ <var>name</var> ... ]</syntax>
-        <default>MDCAChallenges tls-sni-01 http-01</default>
+        <default>MDCAChallenges tls-alpn-01 http-01 dns-01</default>
         <contextlist>
             <context>server config</context>
         </contextlist>
@@ -612,8 +769,8 @@ MDRequireHttps permanent
             <p>
                 Sets challenge types and their execution order when proving domain ownership.
                 The names are protocol specific.
-                The current ACME protocol version implemented by Let's Encrypt defines two challenge
-                types that are supported by <module>mod_md</module>. By default, it will try
+                The current ACME protocol version implemented by Let's Encrypt defines three challenge
+                types that are supported by mod_md. By default, it will try
                 the one on port 443 when available.
             </p>
         </usage>
@@ -630,12 +787,214 @@ MDRequireHttps permanent
         <usage>
             <p>
             Controls if the base server, the one outside all VirtualHosts should be managed by 
-            <module>mod_md</module> or not. Default is to not do this, for the very reason that 
+            mod_md or not. By default, it will not. For the very reason that 
             it may have confusing side-effects. It is recommended that you have virtual hosts 
             for all managed domains and do not rely on the global, fallback server configuration.
             </p>
         </usage>
     </directivesynopsis>
+
+    <directivesynopsis>
+        <name>MDCertificateFile</name>
+        <description>Specify a static certificate file for the MD.</description>
+        <syntax>MDCertificateFile path-to-pem-file</syntax>
+        <contextlist>
+            <context>server config</context>
+        </contextlist>
+        <usage>
+            <p>
+                This is used inside a <directive module="mod_md">MDomainSet</directive> and specifies
+                the file holding the certificate chain for the Managed Domain. The matching
+                key is specified via <directive module="mod_md">MDCertificateKeyFile</directive>.
+            </p>
+            <example><title>Example</title>
+                <highlight language="config">
+&lt;MDomain mydomain.com>
+  MDCertificateFile /etc/ssl/my.cert
+  MDCertificateKeyFile /etc/ssl/my.key
+&lt;/MDomain>
+                </highlight>
+            </example>
+
+            <p>
+                This is that equivalent of the mod_ssl 
+                <directive module="mod_ssl">SSLCertificateFile</directive> directive. It 
+                has several uses. 
+            </p><p>
+                If you want to migrate an existing domain, using static files, to
+                automated Let's Encrypt certificates, for one. You define the
+                <directive module="mod_md">MDomainSet</directive>, add the files here and remove
+                the <directive module="mod_ssl">SSLCertificateFile</directive> from
+                your VirtualHosts. 
+            </p><p>
+                This will give you the same as before, with maybe less repeating lines
+                in your configuration. Then you can add <directive module="mod_md">MDRenewMode</directive>
+                'always' to it and the module will get a new certificate before
+                the one from the file expires. When it has done so, you remove the
+                <directive module="mod_md">MDCertificateFile</directive> and reload the server.
+            </p><p>
+                Another use case is that you renew your Let's Encrypt certificates with
+                another ACME clients, for example the excellent 
+                <a href="https://certbot.eff.org">certbot</a>. Then let your MDs point
+                to the files from certbot and have both working together.
+            </p>
+        </usage>
+    </directivesynopsis>
+
+    <directivesynopsis>
+        <name>MDCertificateKeyFile</name>
+        <description>Specify a static private key for for the static cerrtificate.</description>
+        <syntax>MDCertificateKeyFile path-to-file</syntax>
+        <contextlist>
+            <context>server config</context>
+        </contextlist>
+        <usage>
+            <p>
+                This is used inside a <directive module="mod_md">MDomainSet</directive> and specifies
+                the file holding the private key for the Managed Domain. The matching
+                certificate is specified via <directive module="mod_md">MDCertificateFile</directive>.
+            </p><p>
+                This is that equivalent of the mod_ssl 
+                <directive module="mod_ssl">SSLCertificateKeyFile</directive> directive.
+            </p>
+        </usage>
+    </directivesynopsis>
+
+    <directivesynopsis>
+        <name>MDCertificateStatus</name>
+        <description>Exposes public certificate information in JSON.</description>
+        <syntax>MDCertificateStatus on|off</syntax>
+        <default>MDCertificateStatus on</default>
+        <contextlist>
+            <context>server config</context>
+        </contextlist>
+        <usage>
+            <p>
+                When enabled, a resources is available in Managed Domains at
+                'https://domain/.httpd/certificate-status' that returns a JSON
+                document list key properties of the current and of a renewed
+                certificate - when available.
+            </p>
+            <example><title>Example</title>
+                <highlight language="config">
+{
+  "valid-until": "Thu, 29 Aug 2019 16:06:35 GMT",
+  "valid-from": "Fri, 31 May 2019 16:06:35 GMT",
+  "serial": "03039C464D454EDE79FCD2CAE859F668F269",
+  "sha256-fingerprint": "1ff3bfd2c7c199489ed04df6e29a9b4ea6c015fe8a1b0ce3deb88afc751e352d"
+  "renewal" : { ...renewed cert information... }
+}                
+                </highlight>
+            </example>
+        </usage>
+    </directivesynopsis>
+
+
+    <directivesynopsis>
+        <name>MDChallengeDns01</name>
+        <description></description>
+        <syntax>MDChallengeDns01 path-to-command</syntax>
+        <contextlist>
+            <context>server config</context>
+        </contextlist>
+        <usage>
+            <p>
+                Define a program to be called when the `dns-01` challenge needs to be setup/torn down. 
+                The program is given the argument `setup` or `teardown` followed by the domain name. 
+                For `setup` the challenge content is additionally given.
+            </p><p>
+                You do not need to specify this, as long as a 'http:' or 'https:' challenge
+                method is possible. However, Let's Encrypt makes 'dns-01' the only
+                challenge available for wildcard certificates. If you require
+                one of those, you need to configure this.
+            </p><p>
+                See the section about wildcard certificates above for more details.
+            </p>
+        </usage>
+    </directivesynopsis>
+
+    <directivesynopsis>
+        <name>MDMessageCmd</name>
+        <description>Handle events for Manage Domains</description>
+        <syntax>MDMessageCmd path-to-cmd optional-args</syntax>
+        <contextlist>
+            <context>server config</context>
+        </contextlist>
+        <usage>
+            <p>
+                This command gets called when one of the following events happen for
+                a Managed Domain: "renewed", "expiring", "errored". The command may
+                be invoked for more than these in the future and ignore events
+                it is not prepared to handle.
+            </p><p>
+                This is the more flexible companion to <directive module="mod_md">MDNotifyCmd</directive>.
+            </p>
+            <example><title>Example</title>
+MDMessageCmd /etc/apache/md-message
+
+# will be invoked when a new certificate for mydomain.org is available as:
+/etc/apache/md-message renewed mydomain.com
+                <highlight language="config">
+                </highlight>
+            </example>
+            <p>
+                The program should not block, as the module will wait for it to finish. A
+                return code other than 0 is regarded as an error. 
+            </p><p>
+                'errored' is no immediate cause for concern since renewal is attempted
+                early enough to allow the internet to come back. 
+            </p><p>
+                'expiring' should be taken serious. It is issued when the
+                <directive module="mod_md">MDWarnWindow</directive> is reached. By default this is
+                10% of the certificate lifetime, so for Let's Encrypt this currently
+                means 9 days before it expires. The warning is repeated at most once
+                a day. 
+            </p>
+        </usage>
+    </directivesynopsis>
+
+    <directivesynopsis>
+        <name>MDWarnWindow</name>
+        <description>Define the time window when you want to be warned about an expiring certificate.</description>
+        <syntax>MDWarnWindow duration</syntax>
+        <default>MDWarnWindow 10%</default>
+        <contextlist>
+            <context>server config</context>
+        </contextlist>
+        <usage>
+            <p>
+                See <directive module="mod_md">MDRenewWindow</directive> for a description on
+                how you can specify the time.
+            </p><p>
+                The modules checks the remaining lifetime of certificates and invokes
+                <directive module="mod_md">MDMessageCmd</directive> when there is less than the warn
+                window left. With the default, this mean 9 days for certificates from
+                Let's Encrypt.
+            </p><p>
+                It also applies to Managed Domains with static certificate files (
+                see <directive module="mod_md">MDCertificateFile</directive>).
+            </p>
+        </usage>
+    </directivesynopsis>
+
+    <directivesynopsis>
+        <name>MDServerStatus</name>
+        <description>Control if Managed Domain information is added to server-status.</description>
+        <syntax>MDServerStatus on|off</syntax>
+        <default>MDServerStatus on</default>
+        <contextlist>
+            <context>server config</context>
+        </contextlist>
+        <usage>
+            <p>
+                Apaches 'server-status' handler allows you configure a resource to monitor
+                what is going on. This includes now a section listing all Managed Domains
+                with the DNS names, renewal status, lifetimes and main properties.
+            </p><p>
+                You can switch that off using this directive.
+            </p>
+        </usage>
+    </directivesynopsis>
 
 
 </modulesynopsis>