1. Instalar
sudo apt install certbot python3-certbot-nginx
2. Comando en el terminal
sudo certbot -d stardata.pe -d *.stardata.pe –manual –preferred-challenges http certonly
3. Agregar esta configuracion a sitio virutal de nginx
default_type “text/plain”;
alias /var/www/stardata/;
}
5. Crear el archivo indicado en la carpeta indicado el alias y el contenido.
6. Agregar https al ufw de ubunut
sudo ufw allow https
7. Verificar la configuracion de nginx
nginx -c /etc/nginx/nginx.conf -t
8. Reiniciar nginx
sudo certbot -d gersonponce.com -d *.gersonponce.com –manual –preferred-challenges http certonly
sudo certbot –nginx -d gersonponce.com -d *.gersonponce.com
sudo certbot –authenticator standalone –installer nginx -d gersonponce.com -d *.gersonponce.com –pre-hook “service nginx stop” –post-hook “service nginx start”
certbot-auto –standalone –preferred-challenges http -d gersonponce.com -d *.gersonponce.com
sudo certbot delete –cert-name gersonponce.com
listen 443 ssl;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_certificate /etc/letsencrypt/live/gersonponce.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/gersonponce.com/privkey.pem;
============================================
root@CPUGersonPonce:~# sudo certbot -d chatbot.stardata.pe -manual –preferred-challenges http certonly
Saving debug log to /var/log/letsencrypt/letsencrypt.log
How would you like to authenticate with the ACME CA?
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
1: Nginx Web Server plugin (nginx)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Select the appropriate number [1-3] then [enter] (press ‘c’ to cancel): 3
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for chatbot.stardata.pe
Input the webroot for chatbot.stardata.pe: (Enter ‘c’ to cancel):
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
does not exist or is not a directory
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Input the webroot for chatbot.stardata.pe: (Enter ‘c’ to cancel): public
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
public does not exist or is not a directory
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Input the webroot for chatbot.stardata.pe: (Enter ‘c’ to cancel): /var/www/chatbot
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
/var/www/chatbot does not exist or is not a directory
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Input the webroot for chatbot.stardata.pe: (Enter ‘c’ to cancel): /var/www/chatgpt
Waiting for verification…
Cleaning up challenges
IMPORTANT NOTES:
– Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/chatbot.stardata.pe/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/chatbot.stardata.pe/privkey.pem
Your cert will expire on 2023-04-19. 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:
Donating to ISRG / Let’s Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
Leave A Comment