Fix: Certbot fails nginx installer no matching server block
Symptom
Certbot fails with a “no matching server block” error during certificate installation.
Cause
The Nginx configuration does not include a server_name matching the domain.
Solution
- Create an Nginx server block with the correct server_name.
- Reload Nginx configuration.
- Run Certbot again.
Verify
certbot --nginx
Expected result:
The SSL certificate is issued successfully.
Notes
The domain must resolve to the server IP before running Certbot.
This fix is part of Fix Pack – Ghost behind Nginx.
Get all fixes in one place:
https://diorama0.gumroad.com/l/ptrzok