Reputation: 1162
I am trying to setup encryption on AWS EC2 machine. When I run below command
sudo certbot --nginx -d sitename -d www.sitename.com
Then I get above error.
I edited /etc/nginx/conf.d/default.conf
file and added below lines
server_name sitename www.sitename.com;
Any idea why am I getting above error.
I am using this tutorial.
Upvotes: 1
Views: 883
Reputation: 1449
It is complaining about the suffix in your certificate. The name www.sitename.com
is valid but you also have sitename
with no suffix. You need to make this sitename.com
.
So, you should regenerate your certificate with something like
sudo certbot --nginx -d sitename.com -d www.sitename.com
Upvotes: 2