When trying to setup a new domain (domain5.com) as a Hugo site under Nginx, I’m not able to a) access the new site, b) generate certs from letsencrypt/certbot because it can’t access the .well-known/acme-challenge/ dir.
I’ve read every page I can find over the last few hours trying solutions other people have tried. None have worked. Here’s a few:
Every time I try to access http or https, www or non-www, domain5.com in various combinations, including with /index.html etc. I get redirected to the first domain of this droplet, the one it was initially set up for.
Not as simple an exercise as I set out to do! In theory it was just a case of copying an existing working nginx config, creating the letsencrypt certs and finalising the site. In practice… modified existing nginx config is not working like the other 2 hugo sites and letsencrypt needs to see the site to generate the first cert. Which it can’t do!
Also to note: my other letsencrypt certs are renewing fine on 2 other domains on the same VPS (one a Drupal site, the other a Hugo site), their nginx configs are working fine and are basically the same as this new one I’m trying.
Thanks for your help.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!