Error creating certificate - Augeas.insert() failed

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: bot.samkemp.me

I ran this command:

certbot --apache

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache

Which names would you like to activate HTTPS for?


{HIDDEN}
29: bot.samkemp.live
{HIDDEN}


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 29
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for bot.samkemp.live
Cleaning up challenges
An unexpected error occurred:
augeas.AugeasValueError: Augeas.insert() failed: No match for path expression
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version):

Apache2 - 2.4.25

The operating system my web server runs on is (include version):

Debian 9

I can login to a root shell on my machine (yes or no, or I don't know):

Yes

The version of my client is:

certbot 1.9.0

1 Like

This might be due to a bug in the Augeas lens or perhaps some uncommon format of your Apache configuration. Could you please share the output of apachectl -S? I suspect you'd like to redact some stuff here and there, but please don't redact entire pieces of the configuration, only specific where required in your opinion.

2 Likes
apachectl -S
VirtualHost configuration:
*:443                  bot.samkemp.live (/etc/apache2/sites-enabled/bot.samkemp.me.conf:1)
*:*                    {server hostname} (/etc/apache2/sites-enabled/webmin.1590323448.conf:1)
*:80                   is a NameVirtualHost
         default server {server hostname} (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost {server hostname} (/etc/apache2/sites-enabled/000-default.conf:1)
         port 80 namevhost samkemp.me (/etc/apache2/sites-enabled/samkemp.me.conf:1)
         {redacted name hosts. All very similar to one above}
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/run/apache2/" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
PidFile: "/var/run/apache2/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
1 Like

Hi @SamKemp55

--apache tries to read (and understand) your config file.

If that doesn't work (and if you don't want to change your config), switch to --webroot.

Then your config file is ignored.

See

2 Likes

I don't have anything against changing my config however that user guide you just sent potentially outlines the issue I'm having (I didn't even realise it would be an issue which is why I didn't mention it before).

The host I am trying to make a certificate for doesn't have a path because it proxies. Would this be the cause then?

I deleted my current site and remade it, this time with a document root and that worked.
So the issue was related to the host being a proxy and not having a set path. Thanks for the help

3 Likes

Yep, sometimes such a modification may be the easiest way to fix the problem.

Happy to read you have found a solution :+1: