===== Letsencrypt ===== Imagino que existen como 50mil páginas que ya indican lo que yo voy a documentar... de nuevo no interesa, yo quiero documentarlo para mi... si te sirve.. Letsencrypt!... =$ ==== Instalación ==== Si no tiene instalado git... instálelo con el siguiente comando: # apt-get install git Instale Letsencrypt: # cd /opt # git clone https://github.com/letsencrypt/letsencrypt # cd letsencrypt # ./letsencrypt-auto --help El asistente le ayudará a instalar los paquetes necesarios. ==== Configuración ==== Apache HTTPD puede configurarse de varias maneras, suponiendo que usted es un sencillo labrador que tiene todo un servidor web para su wiki... lo mas probable es que debe habilitar primero SSL, si no tiene habilitado SSL puede habilitarlo de la siguiente manera: # a2enmod ssl # systemctl restart apache2 Para los comandos y rutas de archivos en lugar de la palabra dominio ponga su nombre de domino. Para crear el certificado utilice el siguiente comando: # systemctl stop apache2 # ./letsencrypt-auto certonly --standalone -d dominio.tk -d www.dominio.tk El comando creará cuatro archivos en **/etc/letsencrypt/live/dominio.tk**: # ls /etc/letsencrypt/live/dominio.tk/ cert.pem chain.pem fullchain.pem privkey.pem Para configurar los certificados en apache edite el archivo: **/etc/apache2/sites-enabled/default-ssl.conf**, y déjelo como se muestra a continuación (es un fragmento que contiene lo relevante): SSLEngine on # A self-signed (snakeoil) certificate can be created by installing # the ssl-cert package. See # /usr/share/doc/apache2.2-common/README.Debian.gz for more info. # If both key and certificate are stored in the same file, only the # SSLCertificateFile directive is needed. #SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key SSLCertificateFile /etc/letsencrypt/live/dominio.tk/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/dominio.tk/privkey.pem # Server Certificate Chain: # Point SSLCertificateChainFile at a file containing the # concatenation of PEM encoded CA certificates which form the # certificate chain for the server certificate. Alternatively # the referenced file can be the same as SSLCertificateFile # when the CA certificates are directly appended to the server # certificate for convinience. #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt SSLCertificateChainFile /etc/letsencrypt/live/dominio.tk/chain.pem Ahora reinicie el servidor http: # systemctl start apache2 ==== Renovar ==== # ./letsencrypt-auto --apache renew