Passing custom conf file in certbot

I have this certbot installed and i have several domains i want to access

In my /etc/nginx/sites-available i have several files containing my conf files…for instance nickarden file contains

server {
listen 80;
listen [::]:80;

root /home/ubuntu/armada/;

index index.html;
location / {
try_files $uri $uri/ =404;

How can i use the certbot to use nickarden file with the server conf so that the https version is installed

This only finds my default server

sudo certbot --nginx

Granted that my actual conf file does not have the ending .de. is this valid or how should it be

sudo certbot --nginx -d -d

Hi @britisharmy

are these definitions active?

Symlinks in


Not yet. I dont understand how the whole thing is working.

sudo rm /etc/nginx/sites-enabled/default
sudo ln -s /etc/nginx/sites-available/nickarden /etc/nginx/sites-enabled/nickarden
sudo ln -s /etc/nginx/sites-available/cnn /etc/nginx/sites-enabled/cnn

I am referring from this gist

and i dont understand why we need symlinks and why we need to remove the default in sites-enabled.

Yes, i have a default file pointing to another domain and works great.

That’s how nginx works.

I created the symlinks and i was pleasantly surprised it worked.

For someone wondering what happens to teh default configuration, certbot asks you if you want to renew(no the same words though) and goes ahead to renew and generate the others certs. Its magical.

Just generated 28 new certificates. Woot!. Its also worth noting, that all my certs were issued in the name of the first website it generated a certificate for.

That’s required to have a working configuration with different port 80 vHosts. Then Certbot has the required templates.

Happy to read you have fixed your configuration :+1:

1 Like

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