Ранее установил Certbot и успешно получил сертификат для одного из доменов. Возникла необходимость прикрутить еще один домен. Добавил домент в конфиг nginx, по http все ходит отлично, конфиг выглядит так:
upstream backend {
server 127.0.0.1:8085;
}
server {
server_name domain_name_1 domain_name_2;
access_log /var/log/nginx/domain_name.log;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://backend;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain_name/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain_name/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = domain_name_1) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name domain_name_1 domain_name_2;
return 404; # managed by Certbot
}
При попытке получить сертификат для второго домена domain_name_2 получаю следующую ошибку:
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: domain_name_1
2: domain_name_2
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You have an existing certificate that contains a portion of the domains you
requested (ref: /etc/letsencrypt/renewal/domain_name_1.conf)
It contains these names: domain_name_1
You requested these names for the new certificate: domain_name_1,
domain_name_2.
Do you want to expand and replace this existing certificate with the new
certificate?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(E)xpand/(C)ancel: E
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for domain_name_2
Waiting for verification...
Challenge failed for domain domain_name_2
http-01 challenge for domain_name_2
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: domain_name_2
Type: unauthorized
Detail: Invalid response from
http://domain_name_2/.well-known/acme-challenge/4UtNTakW9jzvq4bo68i_bLYuL7yjF8XfpJ2EiKAD2Cc
[2001:41d0:b:a74:5:39:10:93]: "<!DOCTYPE html>\n<html
lang=\"ru-RU\" prefix=\"og: http://ogp.me/ns#\"
class=\"no-js\">\n<head>\n\n <meta name=\"theme-color\"
content=\"#"
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.
Буду очень благодарен за помощь и идеи!