@inthedeepend If you’re getting an error msg Could not access the challenge file
then I’m guessing your /etc/nginx/sites-available/example.com.conf
is missing this line. This is the issue to be solved in roots/trellis#630 (testing welcome).
In the meantime, here are two options:
Option 1
(specific to your case of converting from manual cert to Let’s Encrypt cert)
Edit /etc/nginx/sites-available/example.com.conf
on server:
server {
listen 80;
server_name example.com;
- return 301 https://$host$request_uri;
+ include acme-challenge-location.conf;
+
+ location / {
+ return 301 https://$host$request_uri;
+ }
}
- on server, run
sudo service nginx reload
- on local machine, run
ansible-playbook server.yml -e env=<environment> --tags letsencrypt
Option 2 (from earlier in thread above)
If none of that works, share a little more about the error you see and about your setup and how it may be different from uncustomized Trellis (e.g., if you added Basic Auth as mentioned by others above, etc.).