While running certbot command I got following error:
[root@vps147238 letsencrypt]# certbot --apache certonly --cert-name purabtech.com -d purabtech.in
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): purab@test.in
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
An unexpected error occurred:
KeyError: 'Directory field not found'
Please see the logfiles in /var/log/letsencrypt for more details.
I am using centos 7.
Solution for this is run following command:
yum install python-certbot-apache -t stretch-backports
It solved my issue.
[root@vps147238 letsencrypt]# certbot --apache certonly --cert-name purabtech.com -d purabtech.in
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Requesting a certificate for purabtech.in
Performing the following challenges:
http-01 challenge for purabtech.in
Waiting for verification…
Cleaning up challenges