eugene-khyst / letsencrypt-docker-compose

Set up Nginx and Let’s Encrypt in less than 3 minutes with a Docker Compose project that automatically obtains and renews free Let's Encrypt SSL/TLS certificates and sets up HTTPS in Nginx for multiple domain names. Configuration is done using a simple CLI tool.
Apache License 2.0
473 stars 218 forks source link

Waiting for Let's Encrypt certificate for <bad-domain-name> #64

Closed tka85 closed 1 year ago

tka85 commented 1 year ago

I added a new service but I mistyped the domain name. Something like example.orgg instead of .org.

I realized it too late and re-run to remove it. Removed successfully (no traces in config.json or under nginx-conf/) but now I see in the logs of letsencrypt-docker-compose-nginx-1 constantly the message Waiting for Let's Encrypt certificate for example.orgg.

Something I can do to clean up so this stops?

eugene-khyst commented 1 year ago

Hi @tka85,

Try running:

docker compose restart --no-deps nginx

This is a bug. After removing the domain, CLI reloads Nginx config: https://github.com/eugene-khyst/letsencrypt-docker-compose/blob/f4169533dc30f30cf0401daa1b6919bdf6cb2217/cli/src/cli.js#L264

But reloading Nginx config doesn't have any effect on this line of the already running Bash script: https://github.com/eugene-khyst/letsencrypt-docker-compose/blob/f4169533dc30f30cf0401daa1b6919bdf6cb2217/nginx/start-nginx.sh#L21 After removing the domain CLI should restart nginx container.

I will fix it. Thanks for reporting the bug.

eugene-khyst commented 1 year ago

@tka85 , have you solved the problem?

tka85 commented 1 year ago

Yep. Thank you very much.

Worked like a charm!