My sub-domain is: api.createburger.com.br
I ran this command: sudo certbot certonly --webroot -w /var/www/createburger -d api.createburger.com.br
It produced this output:
root@vpsapplication:/var/www/createburger# sudo certbot certonly --webroot -w /var/www/createburger -d api.createburger.com.br
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 api.createburger.com.br
Using the webroot path /var/www/createburger for all unmatched domains.
Waiting for verification...
Challenge failed for domain api.createburger.com.br
http-01 challenge for api.createburger.com.br
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: api.createburger.com.br
Type: unauthorized
Detail: 2a02:4780:13:905:0:1624:8c09:3: Invalid response from
http://api.createburger.com.br/.well-known/acme-challenge/9GXuwIxrbOWLshsz6D0xA0rvi6SlpI4cJ5Rh3UOGWR8:
404To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
My web server is (include version):
The operating system my web server runs on is (include version): Ubuntu 20
My hosting provider, if applicable, is: Hostinger
I can login to a root shell on my machine: Yes
My nginx file is like this:
server {
listen 80;
server_name _;
location / {
root /var/www/createburger;
index index.html index.htm;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
try_files $uri $uri/ /index.html;
}
}
server {
listen 80;
server_name api.createburger.com.br;
location / {
proxy_pass http://89.116.214.215:3031;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
root /var/www/createburger;
}
}
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 0.40.0