nginx.conf
is the first configuration file that nginx loads which then chain loads the default.conf
file which in turn loads our standard .location
and .upstream
files..location
and .upstream
files under /opt/nginx/include
which 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.conf
with your own customised defaults.default.conf
you MUST include a ./well-known
location for lets-encrypt to work:/etc/nginx/nginx.conf
file./etc/nginx/nginx.conf
it must include the following lines:nginx.conf
loads its configuration from the /etc/nginx/live/defaults.conf
file.default.conf
in /etc/nginx/operating/defaults.conf
operating
vs live
.live
directory.live
directory is symlinked to your /etc/nginx/custom
directory.live
directory is symlinked to the /etc/nginx/acquire
folder and Nginx-LE is placed into acquisition mode.acquire
path contains a single index.html
page 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.nginx-le acquire
.nginx
will not start if you don't have a valid certificate. The acquisition mode starts nginx
as an HTTP only service to avoid nginx shutting down.nginx-le
switches the live
symlink back to /etc/nginx/custom
and does a nginx
reload and your site is online.