I got the same error as the original poster:
The apache plugin is not working; there may be problems with your existing configuration.
The error was: PluginError('Unable to parse runtime variables',)
...because I have Ubuntu 12.04 and Apache 2.2. I tried the following:
$ cd /opt/letsencrypt
$ ./letsencrypt-auto certonly --webroot -w /var/www/example.com -d www.example.com -d example.com
Failed authorization procedure. www.example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.example.com/.well-known/acme-challenge/dzfUn-A5zn-QICUlmadfz_L86MwKB3-rqzYhE70rTAA [126.96.36.199]: 404, example.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://example.com/.well-known/acme-challenge/xTVFDe7d3s949p0fJ37v5-qwBrpY8W68th3I7PzshTA [188.8.131.52]: 404
- If you lose your account credentials, you can recover through
e-mails sent to curt@______.com
- The following 'urn:acme:error:unauthorized' errors were reported by
Domains: example.com, www.example.com
Error: The client lacks sufficient authorization
- Your account credentials have been saved in your Let's Encrypt
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Let's
Encrypt so making regular backups of this folder is ideal.
No certificates seem to have been created, as shown by the following:
$ cd /etc/letsencrypt
accounts csr keys renewal
What can I try next?
Update on 2016-01-07
I entered the wrong path: /var/www/example.com
I need to enter: /var/www/example.com/public_html
Now it works.