Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for api.claudiaotger.com
Using the webroot path /home/node/formclaudiaotger for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Unable to clean up challenge directory /home/node/formclaudiaotger/.well-known/acme-challenge
Failed authorization procedure. api.claudiaotger.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://api.claudiaotger.com/.well-known/acme-challenge/yRvz7sL8QAp0EY5jZ45-A-tZ_VHQFgpyo4ynO8Ch7BY: "
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
The AAAA record is not set up for any of my domains.
I tried to create a text file in the folder .well-known/acme-challenge/text.tx
And It´s not accecible from a browser
Since this is where the challenge files are expected to be found, try placing a test.txt file at:
/home/node/formclaudiaotger/.well-known/acme-challenge/test.txt
To ensure that file is accessible from the Internet.
mkdir /home/node/formclaudiaotger/.well-known
mkdir /home/node/formclaudiaotger/.well-known/acme-challenge
echo "just a test" > /home/node/formclaudiaotger/.well-known/acme-challenge/test.txt
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not choose appropriate plugin: The requested nginx plugin does not appear to be installed
The requested nginx plugin does not appear to be installed
What operating system are you using, and how did you install certbot? You might need to install the nginx plugin separately. For example if you installed certbot with apt-get, try: sudo apt-get install python-certbot-nginx
If you want to try the webroot plugin instead: I don't see the test.txt file at http://api.claudiaotger.com/.well-known/acme-challenge/test.txt, so probably something in your configuration is causing nginx not to serve files from that web root. If you want to use the --webroot method you'll have to fix that first.
In the config file of my web, this domain has SSL certification working correctly, page looks like this:
server{
listen 80 default_server;
listen [::] default_server ipv6only=on;
server_name claudiaotger.comwww.claudiaotger.com;
return 301 https://claudiaotger.com$request_uri;
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
# ruta a los certificados
ssl_certificate /etc/letsencrypt/live/api.claudiaotger.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.claudiaotger.com/privkey.pem;
# carpeta donde debe buscar los ficheros
root /home/node/formclaudiaotger/views;
# archivo a cargar por defecto
index index.ejs;
# location para comprobacion de letsencrypt
location ~ /.well-know {
allow all;
}
si solicitan una url /, enviamos a la app de nodeform la peticion
It´s what I saw. When I have created the certificate I think it has been created a new one. How can I create a specific certificate for https://api.claudiaotger.com?
I did it with this command:
sudo certbot certonly --webroot --webroot-path=/home/node/formclaudiaotger -d api.claudiaotger.com
I have renewed the certificate just in case aparently worked fine:
udo certbot certonly --webroot --webroot-path=/home/node/formclaudiaotger -d api.claudiaotger.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Cert not yet due for renewal
You have an existing certificate that has exactly the same domains or certificate name you requested and isn’t close to expiry.
(ref: /etc/letsencrypt/renewal/api.claudiaotger.com.conf)
What would you like to do?
1: Keep the existing certificate for now
2: Renew & replace the cert (limit ~5 per 7 days)
Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 2
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for api.claudiaotger.com
Using the webroot path /home/node/formclaudiaotger for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Unable to clean up challenge directory /home/node/formclaudiaotger/.well-known/acme-challenge
IMPORTANT NOTES:
Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/api.claudiaotger.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/api.claudiaotger.com/privkey.pem
Your cert will expire on 2018-02-22. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew all of your certificates, run
"certbot renew"
If you like Certbot, please consider supporting our work by:
Your connection is not private
Attackers might be trying to steal your information from api.claudiaotger.com (for example, passwords, messages or credit cards). Learn more
NET::ERR_CERT_COMMON_NAME_INVALID
nginx uses the server_name to determine which server block to use, and uses that in turn to select which certificate to use. If you don’t specify the server_name then it uses the default, which will probably be correct for one of your sites, but not the other(s). (at least that’s how Apache works, but I suspect nginx does the same)