Eu configurei recentemente uma nuvem via Nextcloud. Eu assinei com sucesso um certificado para o meu link (meu domínio real é diferente). Isso tudo funcionou muito bem.
Mas agora eu também queria ter o certificado para "www.mydomain.home.com". Mas isso não funciona.
nc -z -v -w5 mydomain.home.com 80
Relatórios:
DNS fwd/rev mismatch: mydomain.home.com != host-blabla
mydomain.home.com [255.255.255.255] 80 (http) open
Portanto, a porta 80 para a validação deve estar bem.
É assim que minha configuração do nginx se parece (sites disponíveis / padrão)
server {
listen 80;
server_name *.mydomain.home.com;
# enforce https
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name *.mydomain.home.com;
ssl_certificate /etc/letsencrypt/live/mydomain.home.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mydomain.home.com/privkey.pem;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this
# topic first.
# add_header Strict-Transport-Security "max-age=15768000;
# includeSubDomains; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
# Path to the root of your installation
root /var/www/nextcloud/;
eu usei
certbot certonly --webroot -w /var/www/mydomain.home.com -d
mydomain.home.com -d www.mydomain.home.com
se eu deixar de fora o segundo domínio com o www ele funciona, mas o comando acima me dá a mensagem de erro:
Failed authorization procedure. www.mydomain.home.com (http-01):
urn:acme:error:connection :: The server could not connect to the client
to verify the domain :: DNS problem: NXDOMAIN looking up A for
www.mydomain.home.com
Por que isso?
Além disso, quando eu uso
certbot renew --dry-run
Eu só entendo:
Attempting to renew cert from
/etc/letsencrypt/renewal/mydomain.home.com.conf produced an unexpected
error: Failed authorization procedure. mydomain.home.com (http-01):
urn:acme:error:connection :: The server could not connect to the client
to verify the domain :: Fetching https://*.mydomain.home.com/.well-
known/acme-challenge/GwAAZEokTN1ByCuJUGP4t61mCeuTxIDKypd4DzhcfEg: Error
getting validation data. Skipping.