CERT Renewal: Error while running apachectl configtest

Hi there,

I got several messages regarding renewal, and today managed to get around to it. To my surprise after issuing

sudo certbot --apache

I got:

Error while running apachectl configtest.

    AH00526: Syntax error on line 1 of /etc/httpd/conf/le_http_01_challenge_pre.conf:
    Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

While a file by the name of /etc/httpd/conf/le_http_01_challenge_pre.conf: doesn’t exist on the server in question, running

sudo apachectl configtest


Syntax OK

To make a long story short, the solution was, to uncomment

LoadModule rewrite_module modules/mod_rewrite.so

in file


I think the error message could be more to the point…

Linux gigabyte 5.7.8-arch1-1
apache 2.4.43-1

What version of certbot are you using? Perhaps this issue has been resolved already in the most recent version.

Also, the file le_http_01_challenge_pre.conf is only used and installed for/during the http-01 challenge, so the fact you can’t find it after certbot is done running, is perfectly understandable and normal. However, certbot should enable mod_rewrite when it’s doing the challenge.

community/certbot-apache 1.6.0-1 [installed]

This may be so, but how is a user to know that ? As I said, error messages should aid in devising a remedy, not utter oracle-like gibberish.

That is all fair and improving the error message to guide the user is already on the backlog.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.