Html & Css, Server linux

Hướng dẫn tạo certificate cho domain bằng let’s crypt trên ubuntu, apache

https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04

B1:
Đầu tiên, add the repository:
sudo add-apt-repository ppa:certbot/certbot
Update new repository này:
sudo apt-get update
Instal Certbot từ new repository này:
sudo apt-get install python-certbot-apache

B2: Tạo chứng chỉ
sudo certbot –apache -d example.com -d www.example.com -d test.example.com

Ở đây, nó sẽ tạo ra 1 chứng chỉ cho các domain, trong đó:
– phần tham số đầu tiên là apache
– d: directory
– example.com: đây là tên trang web của bạn, tham số domain này sẽ quyết định thư mục
Bạn có thể tìm hiểu thêm về certbot ở đây(với lệnh trên, mình đã thỏa mãn các yêu cầu mình đặt ra):
https://certbot.eff.org/docs/using.html#certbot-commands

Khi đó nó yêu cầu bạn nhập email để có thể nhận các thông tin domain này.
Sau đó nó sẽ tạo ra 4 chứng chỉ ở thư mục: /etc/letsencrypt/live/example.com/
Trong thư mục này, mình chỉ dùng 2 file: fullchain.pem, privkey.pem

B3:Vào phần cấu hình host, thêm 1 host vào như host bạn đã có trước đó, thay port 80 (thường là mặc định)
bằng port 443.
Sau đó thêm 2 dòng này vào
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
B4: Restart apache.
B5: Kiểm tra cấu hình ở trang: https://www.ssllabs.com/ssltest/analyze.html?d=example.com
B6: Tạo 1 crontab 3 tháng chạy 1 lần để tạo mới chứng chỉ do hết hạn.
sudo crontab -e
15 3 * * * /usr/bin/certbot renew –quiet

Được gắn thẻ