Friday, April 20, 2018

Lets encrypt error while renewing

The client lacks sufficient authorization :: Invalid response from

Full error :


Attempting to renew cert (domain.co.in) from /etc/letsencrypt/renewal/domain.in.conf produced an unexpected error: Failed authorization procedure. domain.co.in (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://domain.co.in/.well-known/acme-challenge/jfJj7OuSofik58w5Zv9QGADQFTR4OK_nfgVNOfg1xTw: "<!DOCTYPE html>
<html lang="en-US" class="bg-black">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width". Skipping.


Solution :
Do not renew it, instead of install certificates again
sudo certbot --apache -d domain.co.in

Install Lets encrypt on Linux AMI

Run Following Commands :
curl -O https://dl.eff.org/certbot-auto
chmod +x certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto

Make sure apache is running on 443 port and it is opened.

Install mod ssl using following command

sudo yum install mod24_ssl
We have used this command because we have installed httpd using `sudo yum install -y httpd24 php56 php56-mysqlnd`

If you have installed httpd using `sudo yum install httpd`, install mod_ssl using

`sudo yum install mod_ssl`
 
Now install certificates using

certbot-auto -d domain.com --debug

https://coderwall.com/p/e7gzbq/https-with-certbot-for-nginx-on-amazon-linux

Client with the currently selected authenticator does not support any combination of challenges that will satisfy the CA.

lets encrypt has one security vulnerability so changed command for generating https certificates

Solution :
sudo certbot --authenticator webroot --installer apache
Now it will ask the domain name to install certificates for it. Follow the instructions and you can install certificates successfully.

Note :
Now this issue has been fixed. Update lets encrypt and use regular commands.