My domain is: max-server.org
I ran this command: certbot --nginx
It produced this output: Could not automatically find a matching server block for max-server.org. Set the server_name
directive to use the Nginx installer.
My web server is (include version): nginx/1.18.0
The operating system my web server runs on is (include version):
My hosting provider, if applicable, is: my own Server / Domain: Strato
I can login to a root shell on my machine (yes or no, or I don't know): Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): certbot 1.21.0
certbot.errors.MisconfigurationError: Could not automatically find a matching server block for max-server.org. Set the server_name
directive to use the Nginx installer.
2025-05-08 02:22:27,798:DEBUG:certbot._internal.error_handler:Calling registered functions
2025-05-08 02:22:27,859:DEBUG:certbot._internal.display.obj:Notifying user: Could not install certificate
2025-05-08 02:22:27,859:DEBUG:certbot._internal.display.obj:Notifying user: NEXT STEPS:
2025-05-08 02:22:27,860:DEBUG:certbot._internal.display.obj:Notifying user: - The certificate was saved, but could not be installed (installer: nginx). After fixing the error shown below, try installing it again by running:
certbot install --cert-name max-server.org
2025-05-08 02:22:27,860:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/bin/certbot", line 33, in
sys.exit(load_entry_point('certbot==1.21.0', 'console_scripts', 'certbot')())
File "/usr/lib/python3/dist-packages/certbot/main.py", line 15, in main
return internal_main.main(cli_args)
File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 1574, in main
return config.func(config, plugins)
File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 1317, in run
raise installer_err
File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 1301, in run
_install_cert(config, le_client, domains, new_lineage)
File "/usr/lib/python3/dist-packages/certbot/_internal/main.py", line 929, in _install_cert
le_client.deploy_certificate(domains, path_provider.key_path, path_provider.cert_path,
File "/usr/lib/python3/dist-packages/certbot/_internal/client.py", line 556, in deploy_certificate
self.installer.deploy_cert(
File "/usr/lib/python3/dist-packages/certbot_nginx/_internal/configurator.py", line 232, in deploy_cert
vhosts = self.choose_vhosts(domain, create_if_no_match=True)
File "/usr/lib/python3/dist-packages/certbot_nginx/_internal/configurator.py", line 339, in choose_vhosts
vhosts = [self._vhost_from_duplicated_default(target_name, True,
File "/usr/lib/python3/dist-packages/certbot_nginx/_internal/configurator.py", line 391, in _vhost_from_duplicated_default
default_vhost = self._get_default_vhost(domain, allow_port_mismatch, port)
File "/usr/lib/python3/dist-packages/certbot_nginx/_internal/configurator.py", line 428, in _get_default_vhost
raise errors.MisconfigurationError("Could not automatically find a matching server"
certbot.errors.MisconfigurationError: Could not automatically find a matching server block for max-server.org. Set the server_name
directive to use the Nginx installer.
2025-05-08 02:22:27,861:ERROR:certbot._internal.log:Could not automatically find a matching server block for max-server.org. Set the server_name
directive to use the Nginx installer.