However, i don’t dare to test it yet because I am afraid it may get error and cause the whole server not working. By then, my 1stdomain will also be effected.
I am totally new to this. Just to double confirm –cert-name , <- is the “name” in this command need to be some word that I set when creating the certificate ?
Your sample command contains --standalone. With this option, Certbot creates its own temporary web server on port 80 in order to prove your control over your domain names. That conflicts with any existing web server that normally listens on port 80.
thx for your reply. I think i made a mistake because this line of coding i copy from elsewhere. Let me share with more details when creating this cert on a fresh install 1 month ago. Bascially, i follow Certbot official docs
So to add new domain to the existing server with same cert. what should be the correct command line? Should i replace “standalone” with “apache” ?
Yes, supposing that /etc/letsencrypt/live only lists my1stdomain.com and that your existing certificate doesn’t cover any other names, including the www subdomains.
It depends whether you want the certificate to cover my2stdomain.com as well. When you run this command, your existing certificate will be replaced with one covering all of the names that you list via -d options. If you include new domains with -d that weren’t covered by the old certificate, they will be included. If you omit existing domains that were covered by the old certificate, they will be excluded.