I have used Certbot https://certbot.eff.org/ over 500 websites till now.
Certbot Automatically enable HTTPS on your website with EFF’s Certbot, deploying Let’s Encrypt certificates.
Read more articles about Certbot Here
Certbot allows many servers (Nginx / Apache / Wowza / Icecast) to enable AUTOmatic SSL renew using Cronjobs.
But sometimes Copy/Paste make strange errors in your server configuration. So, Alert while you write config files….
Certbot letsencrypt renewal attempts failed ‘ascii’ codec can’t decode byte 0xe2 @certbot @letsencrypt #BrilliantYou https://t.co/wjXDrgHWiK pic.twitter.com/G8Son5on1Y
— Sandeep Verma (@svnlabs) April 25, 2019
Error
Attempting to renew cert (domain.net) from /etc/letsencrypt/renewal/domain.net.conf produced an unexpected error: ‘ascii’ codec can’t decode byte 0xe2 in position 34: ordinal not in range(128). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/domain.net/fullchain.pem (failure)
Solution
>>>> Problem becoz of this LINE
# Deny access to uploads that aren’t images, videos, music, etc.
Remove / replace invalid ascii character from above LINE
# Deny access to uploads that are not images, videos, music, etc.
Find ANY/ALL unicode error using following command
# grep -r -P '[^\x00-\x7f]' /etc/apache2 /etc/letsencrypt /etc/nginx
grep: /etc/apache2: No such file or directory
/etc/nginx/sites-available/domain.net.conf: # Deny access to uploads that aren’t images, videos, music, etc.
Tips: use this command to get Free Certbot SSL Cert
# certbot –nginx -d domain.net -d www.domain.net