CentOS 8 Streamの環境上でApacheをインストールし、Let’s Encryptでhttpsに対応させようとしたら、下記のようなエラーが表示されました。
Could not choose appropriate plugin: The apache plugin is not working; there may be problems with your existing configuration. The error was: MisconfigurationError('Apache is unable to check whether or not the module is loaded because Apache is misconfigured.') The apache plugin is not working; there may be problems with your existing configuration. The error was: MisconfigurationError('Apache is unable to check whether or not the module is loaded because Apache is misconfigured.')
「設定に誤りがある」的なエラーが表示されるのですが、configtestしても設定に問題はありませんでした。
いろいろネットを調べてみると、どうもApacheとLet’s Encryptのcertbotの組み合わせが悪いようです。
このApacheは通常の設定を変更してravenというリポジトリから取得したものでした。そこで、一旦アンインストールして、標準のリポジトリからApacheをインストールしたところcertbotは正常に動作しました。