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.