I used Certbot and it didn’t work right away.
I discovered the reason pretty quickly and everything worked fine, but here’s the issue:
My <VirtualHost *:443>
directive had been created by certbot in a separate file.
This is probably the right way to do this in Apache, but for some technical or legacy reason, I had all my vhosts in the main config file, and the line to include the vhosts from an external file:
Include /usr/local/apache2/conf/vhosts/*.conf
was commented out. This is a perfectly valid way to do vhosts.
The fix for the bug would be simply to detect whether that include directive is being used or not.
If it’s commented out as mine was, put the new <VirtualHost *:443>
directive in the main httpd.conf
and optionally, notify the user.
Shall I report this as a bug for the Apache certbot?