Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is:youland.us
I ran this command:certbot --nginx
It produced this output:
The following errors were reported by the server:
Domain: youland.us
Type: unauthorized
Detail: Invalid response from http://youland.us/.well-known/acme-challenge/_rQQoKVKSV-I8nUF96A3qbCNJycBIdW041OebOUGQmc:
“<html>\r\n<head><title>404 Not
Found</title></head>\r\n<body>\r\n<center><h1>404 Not
Found</h1></center>\r\n<hr><center>nginx/1.15.8</ce”
To 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): nginx 1.15.8
The operating system my web server runs on is (include version):
My hosting provider, if applicable, is: GoDaddy
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no
Yeah, it’s running on EC2, I can log in to the instance.
I am using cerbot 0.29.1
the output of “sudo nginx -T” is:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
I changed the “well-known” setting as you suggested, seems it does not work. And the servers file is empty.
Actually there are two “nginx.conf” file, one is located on the directory where nginx is installed, another is on my website repo, I am not sure which one should I update.
When I visit {DOMAIN_NAME}/.well-known/acme-challenge/, it gives me a nginx 404 not found.
The document root location is not explicit, so I can only assume that it might be: /etc/nginx/html/
If not, adjust the following as needed:
Please place a test text file into the challenge folder: mkdir /etc/nginx/html/.well-known mkdir /etc/nginx/html/.well-known/acme-challenge echo "Challenge Accepted! - LOL" > /etc/nginx/html/.well-known/acme-challenge/1234
Then we should be able to reach that file (from the Internet) via URL: http://{YOUR_DOMAIN_NAME}/.well-known/acme-challenge/1234
Since I am using Mac, I changed the “/etc/nginx/html” to “/usr/local/Cellar/nginx/1.15.8/html”, the command shows it successfully created the file, but when I go to http://{YOUR_DOMAIN_NAME}/.well-known/acme-challenge/1234, it keep gives me the “Nginx 404 error”.
Since I am running the wbesite on Amazon EC2 instance, Do I need to do some operation on my local machine or ssh into the EC2?