certbot icon indicating copy to clipboard operation
certbot copied to clipboard

certbot-apache: use httpd by default for CentOS/RHEL

Open wgreenberg opened this issue 3 years ago • 3 comments

Fixes #9386

CentOS and RHEL 9 now use httpd instead of apachectl, so that's now the default for that configurator. There's now a special case for older CentOS/RHEL versions to use apachectl, as well as for older Fedora (<28).

wgreenberg avatar Sep 09 '22 00:09 wgreenberg

Code looks solid, have you already tested it on CentOS/RHEL 8/9 in practice?

ohemorange avatar Sep 13 '22 01:09 ohemorange

This seems like it will now leave self.options.restart_cmd_alt[0] set to "httpd" in some cases, which looks wrong, since httpd restart is not a valid way to invoke httpd. (Though I am not sure how certbot uses restart_cmd_alt so may be missing something)

On all versions of CentOS, RHEL and Fedora it is fine to restart httpd using apachectl restart.

The special case needed is if you want to do something other than control the daemon, e.g. httpd -t or httpd -v in some form, you should run httpd directly.

notroj avatar Sep 14 '22 10:09 notroj

Ah, thanks for the clarification @notroj, turns out I misunderstood the RHEL changelog! Updating the PR

wgreenberg avatar Sep 19 '22 19:09 wgreenberg

@bmw i reworked this into a single class, ready for review again!

wgreenberg avatar Oct 26 '22 21:10 wgreenberg

CHANGELOG entry needs to be moved from 1.25.0 to 1.32.0.

alexzorin avatar Oct 27 '22 00:10 alexzorin

d'oh, good catch @alexzorin. fixed here: https://github.com/certbot/certbot/pull/9444

wgreenberg avatar Oct 27 '22 01:10 wgreenberg

Yeah thanks for catching this Alex. This recurring issue motivates me a bit to take another look at https://github.com/certbot/certbot/issues/8272.

bmw avatar Oct 27 '22 17:10 bmw