Sto cercando di passare da certificati autofirmati a Let's Encrypt certificati sul mio server web nginx.
Attualmente, reindirizzare tutte le richieste per http/80a https/443, che utilizza un certificato auto firmato ho creato qualche tempo fa.
Ora, da quello che ho capito Let's Encrypt fa una richiesta alla porta 80 (come sto usando l' webrootopzione di certbot). Queste richieste vengono reindirizzate, il che rende la generazione del certificato non riuscita.
Ho provato a raggiungere questo obiettivo con il seguente blocco server, ascoltando alla porta 80:
server {
listen 80;
server_name sub.domain.tld;
server_tokens off;
location /.well-known {
root /var/www/letsencrypt;
}
location / {
return 301 https://$host$request_uri;
}
}
Ma le richieste da /.well-knownreindirizzare https/443comunque.
Come posso reindirizzare tutte le richieste da http/80a https/443, tranne le richieste a /.well-known/?
wget/curl
webrootofcertbotrichiede un semplice http.