Certbot --nginx virtual hosts undefined in nginx

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: prs-calarasi.ro

I ran this command: sudo certbot --nginx

It produced this output:
Which names would you like to activate HTTPS for?


1: a.prs-calarasi.ro
2: b.prs-calarasi.ro
3: www.prs-calarasi.ro

My web server is (include version):
nginx version: nginx/1.18.0

The operating system my web server runs on is (include version):
Debian 11

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):certbot 1.12.0

grep server_name /etc/nginx/sites-enabled/* -RiI
server_names_hash_bucket_size 64;
server_name a.prs-calarasi.ro b.prs-calarasi.ro;
server_name a.prs-calarasi.ro b.prs-calarasi.ro;

I don't understand where this virtual host is from? www.prs-calarasi.ro I don't have a virtual host defined in nginx for it

It'll be in there somewhere.

Try searching in the output of:

sudo nginx -T
7 Likes

I found
I had a virtual hosts in /etc/ngnix/conf.d/
now it looks good

sudo certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx

Which names would you like to activate HTTPS for?


1: a.prs-calarasi.ro
2: b.prs-calarasi.ro


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): c

thanks for the quick response

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.