Unable to set value to path!

On debian 9 with apache 2.4

I've installed like this:
apt-get install python-certbot-apache -t stretch-backports

then run:
certbot --authenticator webroot --installer apache

Everything worked fine until I get this message:

An unexpected error occurred:
ValueError: Unable to set value to path!
Please see the logfiles in /var/log/letsencrypt for more details.

If I see the log there's this part:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certbot/client.py", line 489, in deploy_certificate
fullchain_path=fullchain_path)
File "/usr/lib/python3/dist-packages/certbot_apache/configurator.py", line 304, in deploy_cert
vhosts = self.choose_vhosts(domain)
File "/usr/lib/python3/dist-packages/certbot_apache/configurator.py", line 328, in choose_vhosts
return [self.choose_vhost(domain, create_if_no_ssl)]
File "/usr/lib/python3/dist-packages/certbot_apache/configurator.py", line 512, in choose_vhost
self._add_servername_alias(target_name, vhost)
File "/usr/lib/python3/dist-packages/certbot_apache/configurator.py", line 1421, in _add_servername_alias
self.parser.add_dir(vh_path, "ServerAlias", target_name)
File "/usr/lib/python3/dist-packages/certbot_apache/parser.py", line 328, in add_dir
self.aug.set(aug_conf_path + "/directive[last() + 1]", directive)
File "/usr/lib/python3/dist-packages/augeas.py", line 187, in set
raise ValueError("Unable to set value to path!")
ValueError: Unable to set value to path!

In case the same thing happens to any one, here is how I fix it

This was part of my vhost file:

<VirtualHost *:80>
    ServerName www.mydomain.com
    ServerAlias mydomain.com
    DocumentRoot /var/www/mydomain/
        <Directory /var/www/mydomain>
            AllowOverride All
        </Directory>
</VirtualHost>

That alias broke the whole process, so I’ve changed it to

<VirtualHost *:80>
    ServerName www.mydomain.com
    DocumentRoot /var/www/mydomain/
        <Directory /var/www/mydomain>
            AllowOverride All
        </Directory>
</VirtualHost>

Then everything worked fine

Here is a link to an issue: https://github.com/certbot/certbot/issues/5353

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