nginx ssl certbot letsencrypt
1. Instalar cerbot y detener nginx
apt install certbot
systemctl stop nginx
2. Generar certificado
Donde:
certonly: Indica que únicamente queremos generar el certificado, no se configurará automáticamente el servidor web.
–standalone: Indicamos el plugin que queremos utilizar durante el proceso. En éste caso, standalone.
-d: Indicamos el nombre de dominio para el que queremos obtener el certificado. En éste caso,hipy.nethuber.com
# certbot certonly --standalone -d hipy.nethuber.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): Esta dirección de correo electrónico está siendo protegida contra los robots de spam. Necesita tener JavaScript habilitado para poder verlo.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.4-April-3-2024.pdf. You must agree in
order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Account registered.
Requesting a certificate for hipy.nethuber.com
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/hipy.nethuber.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/hipy.nethuber.com/privkey.pem
This certificate expires on 2024-08-05.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3. Usar el certificado
Al archivo hipy.nethuber.com, agregar las líneas en negrilla
4. Recargar la configuración
systemctl reload nginx