ตามปรกติ ถ้าต้อง cert เพื่อใช้กับ https ก็ต้องไปลงทะเบียนกับ Certificate Authority (CA) ซึ่งก็ต้องเสียค่าใช้จ่ายเป็นรายปี แต่มีที่หนึ่งที่ให้เราใช้ได้ฟรี แต่ว่า ต้องทำการต่อทะเบียนอยู่เสมอ(ใช้ได้ 90 วัน) นั่นก็คือ letsencrypt ซึ่งที่นี่เกิดจาก Internet Security Research Group (ISRG) ซึ่งเป็นองค์กรไม่แสวงผลกำไรที่ต้องการส่งเสริมให้มีการเข้ารหัสเพื่อเพิ่มความปลอดภัยให้กับ website ทั่วโลก
การติดตั้งนั้น บน ubuntu server ของเรานั้นทำได้ ตามนี้
1. ติดตั้ง letsencrypt certbot client ลงใน server
$sudo apt-get install python-letsencrypt-apache$ sudo apt-get update $ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update $ sudo apt-get install python-certbot-apache
2. ติดตั้ง SSL certificate
$sudo letsencrypt –apache -d li.kmutt.ac.th -d www.li.kmutt.ac.th
เปลี่ยนเป็น
$sudo certbot-auto –apache -d li.kmutt.ac.th -d www.li.kmutt.ac.th
*ในกรณีมี subdomain เยอะเช่นของเรา ก็สามารถพิมพ์ต่อไปได้เลย เช่น -d celt.li.kmutt.ac.th -d geo.li.kmutt.ac.th ….
**ตรวจสอบ cert ได้ที่ /etc/letencrypt/live หรือ
https://www.sslabs.com/ssltest/analyze.html?d=www.li.kmutt.ac.th
3. เมื่อใกล้ครบกำหนดเวลา 90 วัน ให้ทำการต่ออายุ cert (เวลาเหลือน้อยกว่า 30 วัน)
$sudo letsencrypt renew
$sudo certbot-auto renew
4. ตรวจสอบว่ามี subdomain ไหนที่มี certificate อยู่ใช้คำสั่ง
$sudo ls /etc/letsencrypt/live
5.ถ้าต้องการลบ certificate ทิ้ง
ให้ทำการ disable site ออก โดยใช้คำสั่ง a2dissite
แล้วลบ certificate ด้วยคำสั่ง
$sudo certbot delete –cert-name domin.com
ยอดเยี่ยมเลยครับพี่เค ขอบคุณมากครับ
นโลยีภาษาธรรมชาติและความหมาย
Device encryption with BitLocker is an effective method to protect yourself. You can block unauthorized users from accessing your important information and devices.
aka. ms/recoverykeyfaqTo use this BitLocker password, you must understand all the operations and handling.
I appreciate your quality stuff, that was really so useful and informative.
Great Post! Thank you for visiting here.