When installing I got the error “Unable to install the certificate”. I am installing next cloud on Ubuntu server 18.04 with Nginx. I have two Nginx config files. They are:
When I ran the certbot command, defult.conf did not have a server_name set so that may be why it was unable to install the certificates. It did not set up either of the configuration files to use the certificate. Now they both have the server_name set like so:
- /etc/nginx/conf.d/default.conf as server_name blue.[myDomain].com;
- /etc/nginx/conf.d/nextcloud.conf as server_name bucket.blue.[myDomain].com;
The command I ran and output it gave is bellow. My question is, is there a way to rerun the certbot command and get it to install the certificate and set up the Nginx configuration files or is there instructions for doing that manually?
Thanks for your help.
I ran this command:
sudo certbot --nginx --agree-tos --redirect --staple-ocsp --email [myEmail]@gmail.com -d bucket.blue.[myDomain].com,blue.[myDomain].com
It produced this output:
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for blue.[myDomain].com
http-01 challenge for bucket.blue.[myDomain].com
Using default addresses 80 and [::]:80 ipv6only=on for authentication.
Waiting for verification…
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/conf.d/nextcloud.conf
Could not automatically find a matching server block. Set the
server_name directive to use the Nginx installer.
- Unable to install the certificate
- Congratulations! Your certificate and chain have been saved at:
Your key file has been saved at:
Your cert will expire on 2020-02-27. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the “certonly” option. To non-interactively renew all of
your certificates, run “certbot renew”
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
My web server is (include version):
nginx version: nginx/1.14.0 (Ubuntu)
The operating system my web server runs on is (include version):
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
My hosting provider, if applicable, is:
I can login to a root shell on my machine:
I’m using a control panel to manage my site:
The version of my client is:
My domain is: