Load balancer_NGINX configuration - SomethingWithHorizons/mailserver GitHub Wiki
-
Create new directories within
/var/wwwwherecertbot(letsencrypt) can temporarily place the challenge/validation files:mkdir -p /var/www/letsencrypt/.well-known chown -R www-data:www-data /var/www/letsencrypt
-
Add a new
/etc/nginx/letsencryptfile to handle letsencrypt requests:cat <<EOT >> /etc/nginx/letsencrypt location ^~ /.well-known { default_type "text/plain"; root /var/www/letsencrypt; } EOT
-
Open
/etc/nginx/nginx.confand add the following block within thehttp { ... }section:server { listen 80 default_server; server_name _; location / { root /usr/share/nginx/html; index index.html index.htm; } include letsencrypt; }