DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

Let's Encrypt script with re-tries on challenge verifications

| 10:40:46 11.04.2017

*** UPDATED 2017-08-31 ***

Directadmin developers added a short version of the suggested patch to letsencrypt.sh since VERSION=1.0.9, which is already available from here http://files1.directadmin.com/services/all/letsencrypt/letsencrypt.sh.1.0.9

An actual version of the script can found here: http://files1.directadmin.com/services/all/letsencrypt/letsencrypt.sh

*** OLD WAY ***

Having 10-20-30... domains (and more) in ca.san_config is a challenge to get them verified at once. As it fails randomly with HTTP/500 error:

Challenge error: HTTP/1.1 100 Continue
Expires: Tue, 11 Apr 2017 03:55:26 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache

HTTP/1.1 500 Internal Server Error
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: text/html
Content-Length: 176
Expires: Tue, 11 Apr 2017 03:55:26 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Tue, 11 Apr 2017 03:55:26 GMT
Connection: close

<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>
An error occurred while processing your request.<p>
Reference&#32;&#35;179&#46;8c346d68&#46;1491882926&#46;29101b5
</BODY></HTML>. Exiting...

Solved by giving a chance to re-try...

Patching letsencrypt.sh 1.0.8...

cd /usr/local/directadmin/scripts
cp -p letsencrypt.sh letsencrypt_poralix.sh
wget -O ./letsencrypt_poralix.patch https://raw.githubusercontent.com/poralix/directadmin-utils/master/letsencrypt/letsencrypt_poralix.patch
patch ./letsencrypt_poralix.sh -i letsencrypt_poralix.patch

Downloading custom version (if you have newer letsencrypt.sh)

Or download a full custom version:

cd /usr/local/directadmin/scripts
wget -O ./letsencrypt_poralix.sh https://raw.githubusercontent.com/poralix/directadmin-utils/master/letsencrypt/letsencrypt_poralix.sh
chmod 755 ./letsencrypt_poralix.sh

Running

Now you can run (replace example.com with your domain):

cd /usr/local/directadmin/scripts
./letsencrypt_poralix.sh renew example.com

Example

Getting challenge for mail.poralix.com from acme-server...
Challenge error: HTTP/1.1 100 Continue
Expires: Tue, 11 Apr 2017 04:21:31 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache

HTTP/1.1 500 Internal Server Error
Server: AkamaiGHost
Mime-Version: 1.0
Content-Type: text/html
Content-Length: 176
Expires: Tue, 11 Apr 2017 04:21:31 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Tue, 11 Apr 2017 04:21:31 GMT
Connection: close

<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>
An error occurred while processing your request.<p>
Reference&#32;&#35;179&#46;8c346d68&#46;1491884491&#46;2960089
</BODY></HTML>.

Do you want to retry (yes/no): yes
Waiting for domain verification...
Challenge is valid.

That's it!

P.S. Reported the issue to Directadmin developers today. So I hope they will fix it on their side too...

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.




All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition