0

I have installed lets-encrypt in centos 7 server

yum install epel-release
yum install certbot-nginx

and config nginx.conf with server_name opvietnam.com www.opvietnam.com; After that I reload nginx open firewall with port 443 and generate ssl

certbot --nginx -d opvietnam.com -d www.mywebsite.com

All OK but I config with options 2.Oneday, I want to remove its? I try the test domain. Installing step by step in the test domain And search how to remove LetsEncrypt on single domain. By the way, I see WTF tuts in this website. I used the ways follow his tutorial

rm -rf /etc/letsencrypt/archive/[testdomainname]/
rm -rf /etc/letsencrypt/live/[testdomainname]/
rm -rf /etc/letsencrypt/renewal/[testdomainname].conf

[Panic]. When I installed ssl in another domain again. It displayed one error

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for [domainname]
tls-sni-01 challenge for [www.domainname]
Cleaning up challenges
Cannot find a VirtualHost matching domain www.domainname

So how to fixed this error and certbot revoke -d [sitename].Is it the best way to remove a single Certbot (lets-encrypt) certificate on single domain?

Rei
  • 47
  • 2
  • 6
  • Does the removed domain share a certificate with any other domain? That is, is the certificate a SAN entry with any other domain? – Andrew Domaszek Aug 03 '17 at 09:42
  • No. I used one certificate for one domain. peer to peer and not share with any other domain? – Rei Aug 03 '17 at 13:03

1 Answers1

1

I assume the www.domainname is not the same domain of which certificate you just removed. The error Cannot find a VirtualHost matching domain www.domainname suggests the problem is not with Let's Encrypt, but with configuration tests the certbot performs.

Although you are using Nginx, the error message uses Apache terminology, VirtualHost. See server { } section in Nginx configuration whether it has server_name www.domainname; or not. You may also have combined server_name domainname www.domainname;. If you don't, add one.

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
  • Actually first I use Apache + nginx together. And now I migrated from apache + nginx to nginx + php-fpm. one domain on multidomain have configured with Let's Encrypt. I removed its with this tutorial. These website still active but when I want to add one ssl to new website. It displays issue `Cannot find a VirtualHost matching domain www.domainname.com`.Could you give me a the best link tutorial how to configure after migrating from apache + nginx to nginx + php-fpm – Rei Aug 03 '17 at 12:54
  • `server { listen :80; server_name domainname www.domainame; root xxx; index index.php index.html index.htm; access_log xxx combined; ` That's server block what I configured – Rei Aug 03 '17 at 13:11