By walk
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
SOLVED:
My Nginx reloads were not happening due to a previous config error (setting a root and an alias in the same location). nginx -t and service nginx restart are your friends…
gentle facepalm
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.