Skip to content

Instantly share code, notes, and snippets.

Created Mar 12, 2020
What would you like to do?

Paso 1: Instalar LetsEncrypt

sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install letsencrypt

Paso 2: Configurar el certificado SSL

server {
    listen  80 default_server;
    server_name _;
    location ~ /\.well-known/acme-challenge/ {
        allow all;
        root /var/www/letsencrypt;
        try_files $uri =404;

Paso 3: Habilitar HTTPS LetsEncrypt

sudo letsencrypt certonly -a webroot --webroot-path=/var/www/letsencrypt -m --agree-tos -d ssl.itsynd

Paso 4: Configuracion nginx

server {
    listen 443 ssl;
    ssl on;
    ssl_certificate     /etc/letsencrypt/live/;
    ssl_certificate_key /etc/letsencrypt/live/;
    root /var/www/html/;
    index index.php index.html index.htm;
    location ~ /.well-known {
        root /var/www/letsencrypt;
        allow all;
sudo nginx -t 
sudo service nginx reload

Paso 5: Verificar la renovación automática

/usr/bin/letsencrypt renew && /etc/init.d/nginx reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment