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:
nginx
The operating system my web server runs on is (include version):
ubuntu 16.04
My hosting provider, if applicable, is:
digitalocean
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
This isn't a correct diagnosis of the problem in this case, because the Let's Encrypt CA specifically ignores certificate validation errors resulting from a 301 redirection from HTTP to HTTPS when verifying HTTP-01 challenges. As a result, the behavior of the challenge URL in an ordinary browser isn't exactly reflective of what the CA will decide.
But if the CMS is redirecting all queries, then there is no other directory that could be specified with -w. An exception in the CMS redirection would need to be added to allow the contents of /.well-known/acme-challenge to be served as static files.
However, since he is using nginx, cms would add redirection on Nginx vHost rather than htaccess (which is Apache ). If using webroot, it will avoid the vHost(if I remembered correctly)