Apache httpd
The mod_md module, shipped with Apache 2.4, handles ACME directly inside the server. EAB is supported from Apache 2.4.52.
| Value | Where to find it | In this guide |
|---|---|---|
| ACME directory | fixed for each instance | https://certs.example.com/acme/directory |
| Key ID (kid) | Keys & access → EAB credentials | eab_XXXXXXXXXXXXXXXX |
| HMAC key | shown only once, at creation | CLE_HMAC |
1. Enable the modules
Debian / Ubuntu
a2enmod md ssl && systemctl restart apache22. Configure
/etc/apache2/conf-available/local-cert.conf
MDCertificateAuthority https://certs.example.com/acme/directory
MDCertificateAgreement accepted
MDContactEmail ops@example.com
MDExternalAccountBinding eab_XXXXXXXXXXXXXXXX CLE_HMAC
MDCAChallenges http-01
MDomain nas.home.example.com
<VirtualHost *:443>
ServerName nas.home.example.com
SSLEngine on
# no SSLCertificateFile: mod_md provides the certificate
ProxyPass / http://192.168.1.50:5000/
ProxyPassReverse / http://192.168.1.50:5000/
</VirtualHost>
<VirtualHost *:80>
ServerName nas.home.example.com
</VirtualHost>enable
a2enconf local-cert && systemctl reload apache23. Let it run, then reload
mod_md obtains the certificate in the background, then waits for a reload to activate it. Follow progress in the error log; once it reports that the certificate is ready:
reload
systemctl reload apache2Renewals follow the same pattern: automatic retrieval, activation on the next reload. A daily reload from cron is enough.
Good to know
- To keep the HMAC key out of the configuration,
MDExternalAccountBindingalso accepts the path to a JSON file{"kid": "…", "hmac": "…"}, readable by root only. - If mod_md already manages public domains with Let's Encrypt, put these directives inside a
<MDomain nas.home.example.com> … </MDomain>block so they only apply to internal names.