Demo of setting up lets encrypt for nginx
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
caddy
content
nginx-conf
.dockerignore
.gitignore
Dockerfile
LICENSE
README.md
docker-compose-caddy.yml
docker-compose-nomount.yml
docker-compose.yml

README.md

letsencrypt-demo

Demo of setting up lets encrypt for nginx

Let's encrypt with nginx

If you want to work from scratch

docker-compose -f docker-compose-nomount.yml up -d docker exec -u 0 -it webserver /bin/bash

Verify that the website config is there:

cat /etc/nginx/sites-enabled/test1.test.boucke.be

Optional: add a location to serve .well-known in the config and reload (not needed in nginx)

	location ~ /.well-known {
                allow all;
	}
service nginx reload

Ask for a new certificate:

certbot certonly --non-interactive --agree-tos --email nelis@archiwise.com --domains test1.test.boucke.be --webroot --webroot-path /var/www/html/test1.test.boucke.be/

Update the config with the https settings example

service nginx reload

Let's encrypt with Caddy

docker-compose -f docker-compose-caddy.yml up -d