Certbot certonly --agree-tos --email xx@gmail.com --webroot -w /var/lib/letsencrypt/ -d xxx.domain.com repond 404

Server merchant:hostinger

Current OS : Ubuntu 20.04 64bit

root@vps:~# sudo certbot certonly --agree-tos --email xx@gmail.com --webroot -w /var/lib/letsencrypt/ -d xxx.domain.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for xxx.domain.com
Using the webroot path /var/lib/letsencrypt for all unmatched domains.
Waiting for verification...
Challenge failed for domain xxx.domain.com
http-01 challenge for xxx.domain.com
Cleaning up challenges
Some challenges have failed. IMPORTANT NOTES:

tail -f /var/log/letsencrypt/letsencrypt.log
cert, chain, key, _ = self.obtain_certificate(domains)
File "/usr/lib/python3/dist-packages/certbot/client.py", line 348, in obtain_certificate
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
File "/usr/lib/python3/dist-packages/certbot/client.py", line 396, in _get_order_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 91, in handle_authorizations
self._poll_authorizations(authzrs, max_retries, best_effort)
File "/usr/lib/python3/dist-packages/certbot/auth_handler.py", line 180, in _poll_authorizations
raise errors.AuthorizationError('Some challenges have failed.')
certbot.errors.AuthorizationError: Some challenges have failed.

I searched a lot and tried a lot of solutions, but no solution, does anyone know how to solve it?

That is almost certainly not the correct folder for the webroot path.

It should be the root folder where your server gets files. For nginx it is the root folder value for the matching server. For Apache it is the DocumentRoot folder for the VirtualHost.

If you are using some other server check its docs to learn its root folder.

5 Likes