"one vhost per file"

tl;dr: Try moving the <VirtualHost> to a separate file in /etc/httpd/conf.d/ (they’re included automatically).

I did some additional testing and it looks like certbot doesn’t like the fact that the <VirtualHost> tag is inside of httpd.conf - it would rather have it in a dedicated <VirtualHost> file. I was able to reproduce this on CentOS. The <VirtualHost> count is done after the configurator copies the configuration, and I guess it’s really expecting something more like the Debian/Ubuntu apache configuration style, where <VirtualHost>s reside in a separate, dedicated directory. Not sure if this is intended or a bug. The documentation is a bit ambiguous on this point - the website indicates that the apache plugin is supported on CentOS, while the apache plugin documentation says it’s only supported on Debian-based distributions. We should probably clarify that and say that CentOS is supported, but the configuration needs to be closer to what Debian/Ubuntu does.

1 Like