Without using "--cert-name" certbot will create a new cert name.
[based on the name(s) in the new cert]
But when that new name conflicts with an already existing cert name, certbot will add an incrementing suffix - starting with "-0001".
Now serve them up [correctly] via nginx.
OR
If that is not possible, get new cert(s) and delete any unused certs.
And then serve what remains via nginx.
So are you saying I should load concept.staging.smart48.com-0001 for both concept.staging and staging Nginx configuration files as that certificate should cover both subdomains and wildcard certificates?
Staging now still loads:
sudo cat /etc/nginx/sites-available/staging.smart48.com
# Ploi Webserver Configuration, do not remove!
include /etc/nginx/ploi/staging.smart48.com/before/*;
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name .staging.smart48.com;
root /home/ploi/staging.smart48.com/current/public;
# ssl_certificate /etc/nginx/ssl/certificates/staging.smart48.com.crt;
ssl_certificate /etc/letsencrypt/live/staging.smart48.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/staging.smart48.com/privkey.pem;
# ssl_certificate_key /etc/nginx/ssl/certificates/staging.smart48.com.key;
...
for staging nginx config as well. Do think I need to clean up some of the certificates , but want to make sure I do not screw up again. Also will need to test some subdomains. Thanks a lot @rg305 and @MikeMcQ !
Hmm, yeah, https://t3st.concept.staging.smart48.com does not work this way. So I guess I have zero wildcard options this way as you said. Perhaps I need to delete all in
ll
total 24
drwx------ 5 root root 4096 Nov 8 06:12 ./
drwxr-xr-x 7 root root 4096 Nov 8 07:02 ../
drwxr-xr-x 2 root root 4096 Sep 27 10:01 concept.staging.smart48.com/
drwxr-xr-x 2 root root 4096 Nov 8 06:12 concept.staging.smart48.com-0001/
-rw-r--r-- 1 root root 740 Mar 26 2023 README
drwxr-xr-x 2 root root 4096 Nov 8 05:20 staging.smart48.com/
and do one for both sites and wildcards. Or one wildcard for concepts and staging as I had working before. How do I do that?
No I have not learned how to use certname. You mentioned :
Without using "--cert-name " certbot will create a new cert name.
[based on the name(s) in the new cert]
But when that new name conflicts with an already existing cert name, certbot will add an incrementing suffix - starting with "-0001 ".
So sounds like I should add --certname-name to overwrite existing ones. So I do not get odd numbers at the end.
^^ requires a name [and a dash]
Like: --cert-name staging.smart48.com
OR --cert-name staging-cert
OR --cert-name something-else
[any unique string will work - it's just a LABEL]