Cuaderno de un Entusiasta de la Simulación de Vuelo

中文 English 日本語 Français Deutsch Español 한국어 Русский 繁體中文

Instalación del certificado electrónico Let's Encrypt

El año pasado escribí sobre el soporte de HTTPS en el sitio web y el uso de observatory.mozilla.org para mejorar la seguridad del sitio. En ese momento, se utilizaba un certificado gratuito de StartCom con una validez de un año. El certificado caduca a finales de este mes, así que intentaré instalar el certificado electrónico de Let’s Encrypt, que se ha vuelto popular recientemente.

Primero, ejecute estos comandos en Mac para instalar certbot. $ brew update $ brew install certbot $ brew ls certbot /usr/local/Cellar/certbot/0.9.3_1/bin/certbot /usr/local/Cellar/certbot/0.9.3_1/bin/letsencrypt /usr/local/Cellar/certbot/0.9.3_1/libexec/bin/ (18 files) /usr/local/Cellar/certbot/0.9.3_1/libexec/lib/ (1946 files) /usr/local/Cellar/certbot/0.9.3_1/libexec/ (2 files) /usr/local/Cellar/certbot/0.9.3_1/share/certbot/ (7 files)

Luego ejecute en Mac $ certbot –config-dir ~/letsencrypt/etc –work-dir ~/letsencrypt/lib –logs-dir ~/letsencrypt/log certonly –manual Ingrese email, dominio, Siga las instrucciones para crear el archivo de autenticación en .well-known/acme-challenge/ en el servidor y presione Enter,

Parece que el certificado se obtuvo con éxito y se muestra lo siguiente:

IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at /Users/laoyanhunhua/letsencrypt/etc/live//fullchain.pem. Your cert will expire on 2017-04-08. 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 lose your account credentials, you can recover through e-mails sent to [email protected]. - Your account credentials have been saved in your Certbot configuration directory at /Users/laoyanhunhua/letsencrypt/etc. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal. - 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

Puede ver que se generan 4 archivos en local etc/live/yinlei.org/: cert.pem chain.pem fullchain.pem privkey.pem

Luego, coloque los archivos privkey.pem (clave privada), cert.pem (certificado del sitio web) y chain.pem (certificado intermedio) en el servidor web en orden. (Domain settings→SSL certificate update→Upload private key→Install certificate→Install intermediate certificate) La desventaja de Let’s Encrypt es que el período de validez es de solo 3 meses, lo cual es demasiado corto..

Material de referencia Let’s Encrypt の使い方 Windows ユーザーの HTTPS化 - さくらのレンタルサーバ + Let’s Encrypt + WordPress マルチサイト let’s encrypt でmúltiplesnombres de hostcompatibleなcertificadoをcrear

Posteriormente, optimicé el sitio web, Incluyendo fusionar 3 archivos CSS en uno solo, Al llamar a javascript, use el método asíncrono (agregue el parámetro async), Siento que la velocidad de visualización de la página ha mejorado un poco. En las herramientas de Google testmysite.thinkwithgoogle.com y PageSpeed Insights, los resultados realmente han mejorado.

Nota actualizaciónLet’s Encryptcertificado electrónico的método