Apologies if this is a newbish question, I’m hoping there is a simple way to get around a problem.
I’ve been playing with let’s encrypt and trying to come up with a simple / easy way to do the following:
- Set up port 80 locations for letsencrypt challenge and manage redirects to port 443
- Server on port 443 to use letsencrypt certs
- Ability to not have to manage the above configs in tandem with the letsencrypt certs (i.e. no matter what, bring up the server on port 80, and bring up server on port 443 when available / on next nginx restart and everything is set up).
I confess, this is desirable just to simplify / be lazy.
At the moment I can’t seem to get around the fact that without the certs, nginx won’t start because the certs can’t be found, which means I can’t get the certs because the letsencrypt challenge will fail when trying to access my site.
Has anyone found a reasonable way of managing this, or will it be a case of writing a script to manage the dance of only enabling port 80 for the challenge, then get the certs, followed by enabling the 443 server?