My domain is:
forinstance.io
I ran this command:
sudo /usr/local/bin/certbot-auto –-expand -d forinstance.io -d www.forinstance.io -d mail.forinstance.io
It produced this output (in log):
certbot.errors.MisconfigurationError: Could not automatically find a matching server block for mail.forinstance.io. Set the server_name
directive to use the Nginx installer.
2020-05-03 22:36:50,311:DEBUG:certbot._internal.error_handler:Calling registered functions
2020-05-03 22:36:50,396:DEBUG:certbot._internal.reporter:Reporting to user: Unable to install the certificate
2020-05-03 22:36:50,397:DEBUG:certbot._internal.log:Exiting abnormally:
My web server is (include version):
nginx/1.18.0
The operating system my web server runs on is (include version):
centos-release-8.1-1.1911.0.9.el8.x86_64
My hosting provider, if applicable, is:
Digital Ocean
I can login to a root shell on my machine (yes or no, or I don't know):
Yes I'm using Putty.
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.3.0
Additional Background:
This directive is from my nginx.conf file.
server_name forinstance.io www.forinstance.io;
I Installed a certificate for forinstance.io and www.forinstance.io by using this command.
$ sudo /usr/local/bin/certbot-auto --nginx
The installer updated my nginx.conf file. I checked my cert on https://www.ssllabs.com/ssltest and received an A.
However a few minutes later when I expanded my certificate to include the mail server it threw an error.
$ sudo /usr/local/bin/certbot-auto –-expand -d forinstance.io -d www.forinstance.io -d mail.forinstance.io
I included the error from my letsencrypt.log above.
Question:
How do I get certbot-auto to expand my certificate to include the mail server without throwing an error?
If expanding the certificate is not the right choice, how do I get a second certificate with certbot-auto that doesn't conflict with the first?
I should add that the mailserver is hosted on Digital Ocean in the same droplet. I am using postfix and dovecot.