nginx.confis the first configuration file that nginx loads which then chain loads the
default.conffile which in turn loads our standard
/opt/nginx/includewhich is normally done via a persistent volume but you could directly include these files in your own custom nginx-le container.
/etc/nginx/custom/default.confwith your own customised defaults.
default.confyou MUST include a
./well-knownlocation for lets-encrypt to work:
/etc/nginx/nginx.confit must include the following lines:
nginx.confloads its configuration from the
livedirectory is symlinked to your
livedirectory is symlinked to the
/etc/nginx/acquirefolder and Nginx-LE is placed into acquisition mode.
acquirepath contains a single
index.htmlpage informing users that a certificate needs to be acquired. In this mode no other content will be served and only requests from certbot will be processed.
nginxwill not start if you don't have a valid certificate. The acquisition mode starts
nginxas an HTTP only service to avoid nginx shutting down.
livesymlink back to
/etc/nginx/customand does a
nginxreload and your site is online.