certbot cannot find my domain

Posted July 24, 2018 5.4k views
ApacheLet's EncryptUbuntu 16.04

I have several domains connected to my server, when i run

sudo certbot –nginx

only one of my domains can be found. is there a step I am missing. Its been a while since I have worked on this

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Hello friend!

When you say the domain cannot be found, do you mean that it is not trying to apply a certificate to one of your defined domains, or it’s giving an error stating that the domain’s DNS cannot be found?

Kind Regards,

it is not trying to apply a certificate to the domains. It can only find one. I have several being hosted on this droplet

root@PortfolioProjects:~# sudo certbot –nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Starting new HTTPS connection (1):

Which names would you like to activate HTTPS for?

1: ********.com

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

If using nginx for a django, I found I has used the same upstream for two domains and this caused one not to show up in the certbot list. this was the duplicated code that needed to be unique for each subdomain, had used wwwskorie twice::

  upstream wwwskorie {
       server unix:///home/django/sockets/some_uwsgi.sock ;
 uwsgi_pass wwwskorie ;
    include /etc/nginx/uwsgi_params ;

Also occurs if you have duplicated server_name