I can reproduce your issue when using httpd from that repository.
From some investigation, it looks like the build that CodeIT produces does not support the right combination of apachectl
/httpd
commands that Certbot is expecting.
For instance, on the normal CentOS 7 build of httpd, the below command works:
apachectl -t -D DUMP_RUN_CFG
But in the CodeIT build, it goes badly:
# apachectl -t -D DUMP_RUN_CFG
Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
To pass extra arguments to httpd, see the httpd.service(8)
man page.
Now, usually, you can change the "ctl" command used by Certbot by passing --apache-ctl httpd
, for example. But in this case, it produces yet another error, because Certbot tries to run:
httpd configtest
but the CodeIT build doesn't support that either - it expects the old command (apachectl configtest
) to be used.
Here's a link to the CentOS platform overrides in the Certbot Apache plugin: https://github.com/certbot/certbot/blob/754c34c12043bbbe3ceb12fb5660f841d09e3690/certbot-apache/certbot_apache/override_centos.py#L26-L44
I'm not sure what you should do, other than not use the Apache plugin and switch to webroot. This bug seems like a bit of a nightmare to solve to me, since fixing it in Certbot would basically require special support for the CodeIT build, from what I can see right now.
Edit: Maybe it's possible to create some kind of "wrapper" --apache-ctl
script that routes each subcommand to the right CodeIT httpd binary, but you're on your own for that.