SSL Letsencript fails

castris

Verified User
Joined
Apr 16, 2021
Messages
96
Location
Arcenillas
Hi.

Sceneario​

Troubleshooting Let's Encrypt Errors

Code:
cat /usr/local/directadmin/conf/directadmin.conf | grep letsencrypt=1
letsencrypt=1
cat /etc/httpd/conf/extra/httpd-alias.conf
Alias /.well-known/acme-challenge /var/www/html/.well-known/acme-challenge
da build rewrite_confs

echo "test" >> /var/www/html/.well-known/acme-challenge/test.txt


curl -I -L -k -X GET http://beatrizdescragnolle.com/.well-known/acme-challenge/test.txt
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sat, 14 Dec 2024 14:38:14 GMT
Content-Type: text/html
Content-Length: 162
Connection: keep-alive
Location: https://beatrizdescragnolle.com/.well-known/acme-challenge/test.txt

HTTP/2 200
server: nginx
date: Sat, 14 Dec 2024 14:38:14 GMT
content-type: text/plain
content-length: 5
last-modified: Sat, 14 Dec 2024 14:36:03 GMT
etag: "5-6293bddf08fbc"
accept-ranges: bytes
vary: User-Agent

CleanShot 2024-12-14 at 15.36.40.jpg


Also tries manual forcing.
Code:
cd /usr/local/directadmin
echo `date +%s --date='61 days ago'` > "data/users/beatrizde/domains/beatrizdescragnolle.com.cert.creation_time"
/usr/local/directadmin/directadmin taskq --run 'action=rewrite&value=letsencrypt&domain=beatrizdescragnolle.com' --debug 3100

executeAsUser2('/bin/mount', 10, root, 1, '(null)', int *child_pid, *snd, group=(null)) uid=0 gid=0
Apache::figure_out_setup. Class instance
execute('/usr/sbin/suexec -V', maxsize=19, fd=1)
Apache::figure_out_setup:
cli=0
suexec_per_dir=1
webapps_inbox_prefix=0
php1_ver=8.3
php1_fpm=1
php1_fcgi=0
php2_ver=8.2
php1_fpm=1
php1_fcgi=0
php3_ver=8.1
php1_fpm=1
php1_fcgi=0
php4_ver=8
php1_fpm=1
php1_fcgi=0
php5_ver=7.4
php1_fpm=1
php1_fcgi=0
php6_ver=0
php1_fpm=1
php1_fcgi=0
php7_ver=0
php1_fpm=1
php1_fcgi=0
php8_ver=0
php1_fpm=1
php1_fcgi=0
php9_ver=0
php1_fpm=1
php1_fcgi=0
Apache::figure_out_setup. DONE.
2024/12/14 14:40:12  info executing task            task=action=rewrite&domain=beatrizdescragnolle.com&value=letsencrypt
dataskq: command: action=rewrite&domain=beatrizdescragnolle.com&value=letsencrypt
Ssl::check_letsencrypt_expiries: START (this_domain_only=beatrizdescragnolle.com
Ssl::letsencrypt_about_to_expire: checking file ./data/users/beatrizde/domains/beatrizdescragnolle.com.cert.creation_time
Ssl::letsencrypt_about_to_expire: Missing certificate: './data/users/beatrizde/domains/beatrizdescragnolle.com.cert'
Ssl::check_letsencrypt_expiries: renewed 0 certificates
get_hook_paths_from:/usr/local/directadmin/scripts/custom/check_letsencrypt_expiries_post.sh: Found hook name 'check_letsencrypt_expiries_post'
get_hook_paths_from:/usr/local/directadmin/scripts/custom/check_letsencrypt_expiries_post.sh: got the following paths for 'check_letsencrypt_expiries_post':
listType: 0 size=64

Try ohter way


Code:
/usr/local/directadmin/scripts/letsencrypt.sh request beatrizdescragnolle.com 4096
2024/12/14 14:54:20 [INFO] [beatrizdescragnolle.com, www.beatrizdescragnolle.com] acme: Obtaining SAN certificate
2024/12/14 14:54:20 [INFO] [beatrizdescragnolle.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz/2034190377/444762966975
2024/12/14 14:54:20 [INFO] [www.beatrizdescragnolle.com] AuthURL: https://acme-v02.api.letsencrypt.org/acme/authz/2034190377/444802862395
2024/12/14 14:54:20 [INFO] [beatrizdescragnolle.com] acme: authorization already valid; skipping challenge
2024/12/14 14:54:20 [INFO] [www.beatrizdescragnolle.com] acme: Could not find solver for: tls-alpn-01
2024/12/14 14:54:20 [INFO] [www.beatrizdescragnolle.com] acme: use http-01 solver
2024/12/14 14:54:20 [INFO] [www.beatrizdescragnolle.com] acme: Trying to solve HTTP-01
2024/12/14 14:54:29 [INFO] Skipping deactivating of valid auth: https://acme-v02.api.letsencrypt.org/acme/authz/2034190377/444762966975
2024/12/14 14:54:29 [INFO] Deactivating auth: https://acme-v02.api.letsencrypt.org/acme/authz/2034190377/444802862395
2024/12/14 14:54:29 Could not obtain certificates:
    error: one or more domains had a problem:
[www.beatrizdescragnolle.com] acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: 2606:4700:3030::6815:9d6: Invalid response from http://www.beatrizdescragnolle.com/.well-known/acme-challenge/kRvOmaP3CDxhaiD6dFug9Kfrpg9B-K-2sGsW6dEkaMA: 403

Desesperate... all domains migrate brkoen https.
 
I could be wrong, using Cloudflare proxy shouldn't matter unless you want wildcard certs, then you need to use LEGO option, which I do.
 
Back
Top