nginx servers self-singed certificate instead of Let’s Encrypt one

Installed iRedMail groupware. First time working with nginx. Have not found a way to load Let’s Encrypt cert yet.

Ran “sudo certbot --nginx”
Output: Waiting for verification…Cleaning up challenges
Could not automatically find a matching server block for FQDN. Set the server_name directive to use the Nginx installer.
IMPORTANT NOTES:

  • Unable to install the certificate
  • Congratulations! Your certificate and chain have been saved at:
    /etc/letsencrypt/live/FQDN/fullchain.pem
    Your key file has been saved at:
    /etc/letsencrypt/live/FQDN/privkey.pem

sudo vim /etc/nginx/nginx.conf.default

HTTPS server

#
server {
    listen       443 ssl;
    server_name  FQDN;
    ssl_certificate     /etc/letsencrypt/live/FQDN/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/FQDN/privkey.pem;
    ssl_session_cache    shared:SSL:1m;
    ssl_session_timeout  5m;
    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers  on;
    access_log logs/default.access.log main;
    location / {
        root   html;
        index  index.html index.htm;
    }
}

}

Ran: sudo nginx -s reload Still self-sing cert.
systemctl restart nginx Still self-singed certificate.
Restarted VM, still self-signed certificate.

1 Reply

No solution found. VM deleted.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct