hi guys,
i am trying to replace the self signed ssl certificate on a virtualmin GPL virtual server.
- Virtualmin>Edit Virtual Server>Enabled Features (Apache ssl website enabled = yes)
- Virtualmin>Server Configuration>Manage SSL Certificate>Lets Encrypt (request certificate)
Requesting a certificate for whmcs..com.au, www.whmcs..com.au, autoconfig.whmcs..com.au, autodiscover.whmcs..com.au from Let’s Encrypt …
… request failed : Web-based validation failed : Failed to request certificate :
Parsing account key…
Parsing CSR…
Registering account…
Already registered!
Verifying autoconfig.whmcs..com.au…
Traceback (most recent call last):
File “/usr/share/webmin/webmin/acme_tiny.py”, line 235, in
main(sys.argv[1:])
File “/usr/share/webmin/webmin/acme_tiny.py”, line 231, in main
signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, args.dns_hook, args.cleanup_hook, log=LOGGER, CA=args.ca)
File “/usr/share/webmin/webmin/acme_tiny.py”, line 184, in get_crt
domain, challenge_status))
ValueError: autoconfig.whmcs..com.au challenge did not pass: {u’status’: u’invalid’, u’validationRecord’: [{u’addressesResolved’: [], u’url’: u’http://autoconfig.whmcs..com.au/.well-known/acme-challenge/kfU4vlfl9nNhuB3MoXFL5Fo-bPtJuNr7FyaLGDIzT-A’, u’hostname’: u’autoconfig.whmcs..com.au’, u’addressesTried’: [], u’addressUsed’: u’’, u’port’: u’80’}], u’keyAuthorization’: u’kfU4vlfl9nNhuB3MoXFL5Fo-bPtJuNr7FyaLGDIzT-A.LPn7lnznx_Cy-uIyknNx29iceyVMD3DeRyWoC9ITcMM’, u’uri’: u’https://acme-v01.api.letsencrypt.org/acme/challenge/m4D0V1A-STsJ6Bwq98ts3ykHJ-s6njBAw7pAm9E2EOs/2125703813’, u’token’: u’kfU4vlfl9nNhuB3MoXFL5Fo-bPtJuNr7FyaLGDIzT-A’, u’error’: {u’status’: 400, u’type’: u’urn:acme:error:connection’, u’detail’: u’DNS problem: NXDOMAIN looking up A for autoconfig.whmcs..com.au’}, u’type’: u’http-01’}
DNS-based validation failed : Failed to request certificate :
Parsing account key…
Parsing CSR…
Registering account…
Already registered!
Verifying autoconfig.whmcs..com.au…
Traceback (most recent call last):
File “/usr/share/webmin/webmin/acme_tiny.py”, line 235, in
main(sys.argv[1:])
File “/usr/share/webmin/webmin/acme_tiny.py”, line 231, in main
signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, args.dns_hook, args.cleanup_hook, log=LOGGER, CA=args.ca)
File “/usr/share/webmin/webmin/acme_tiny.py”, line 122, in get_crt
raise ValueError(“Error requesting challenges: {0} {1}”.format(code, result))
ValueError: Error requesting challenges: 429 {
“type”: “urn:acme:error:rateLimited”,
“detail”: “Error creating new authz :: Too many invalid authorizations recently.”,
“status”: 429
}
I have followed Jamies advice i found on another forum post about this kind of error
If you’re seeing that error about “couldn’t download …” , one way to debug what’s happening is to create the directory /home/domain/www/.well-known/acme-challenge/ manually and create a small file named text.txt in it. Then run :
curl http://domain.net/.well-known/acme-challenge/test.txt
and see what output you get. If that doesn’t download the file, it means that some .htaccess rule is blocking or redirecting access away from the directory, and so the Let’s Encrypt client won’t work.
Here is my output following Jamies advice…
[root@server3 ~]# curl http://domain.net/.well-known/acme-challenge/test.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
0 0 0 0 0 0 0 0 --:–:-- 0:00:01 --:–:-- 0
0 0 0 0 0 0 0 0 --:–:-- 0:00:02 --:–:-- 0
100 345 100 345 0 0 118 0 0:00:02 0:00:02 --:–:-- 118
404 - Not Found
here is the .htaccess file that is found within the directory where i placed test.txt
AuthType None
Require all granted
Satisfy any
and this is the .htaccess file that is inside home/whmcs/public_html/whmcs directory
RewriteEngine On
Announcements
RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+.html$ ./announcements.php?id=$1 [L,NC]
RewriteRule ^announcements$ ./announcements.php [L,NC]
Downloads
RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^downloads$ ./downloads.php [L,NC]
Knowledgebase
RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+.html$ ./knowledgebase.php?action=displayarticle&id=$1 [L,NC]
RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC]
RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC]
OpenID Discovery Document (http://openid.net/specs/openid-connect-discovery-1_0.html)
RewriteRule ^.well-known/openid-configuration ./oauth/openid-configuration.php [L,NC]
Help!!!
(could i simply navigate to /home/whmcs/ and replace the existing “ssl.cert” and “ssl.key” with new ones i download manually from letsencrypt?)