Error with apache macros

Recently I updated my apache configuration with a new version using Apache macros. Since I updated the configuration Letsencrypt fails to renew the certificate.

My apache version is:


The command used to renew is:

certbot-auto --dry-run --apache certonly --non-interactive -d -d

then I get this warning below and finally the challenge fails.

Encountered vhost ambiguity when trying to find a vhost for but was unable
to ask for user guidance in non-interactive mode. Certbot may need vhosts to be explicitly
labelled with ServerName or ServerAlias directives.                                   
Falling back to default vhost *:443...

My conf file looks like this:

<Macro Domains1>

<Macro WebDir1>
    AllowOverride All
    Options +Includes

Use SimpleHost mydomainname Domains1 WebDir1

SimpleHost is a macro which uses the other macros with details about aliases and options. Once the macros have been expanded the result would be like a regular VirtualHost. My Apache configuration is valid but Letsencrypt cannot understand it :confused: .

Is there some way to tell LetsEncrypt about the domain IP and other information it could need? for example as comments in the apache conf or something similar? Thanks

Just use the option --webroot and the parameter -w (–webroot-path) to tell certbot where to place the challenge files:

Thanks @bytecamp. It worked :sweat_smile:

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