ปกติ Cyber Panel จะรองรับเป็นหลัก แต่ก็สามารถใช้ deploy Node.JS ได้เหมือนกัน โดยสามารถทำได้สองวิธีคือ
1. ใช้ fcgi ของ Openlitespeed ตามตัวอย่างนี้
viewtopic.php?f=27&t=83188
2. ด้วยวิธีทำ reverse proxy เหมือนกับ NGinx (ไว้จะมาแนะนำต่อภายหลัง)
แต่ทั้งสองวิธี จะมีปัญหากับ https อยู่บางเคสซึ่งตรงนี้ เป็น bug ของ Cyber Panel หรือยังไม่ได้ทำ feature นี้ไว้รองรับคือ
ถ้าเรา Gen SSL ใหม่หลังจากที่เราเคย deploy Node.JS ด้วยวิธีที่ 1 ไปแล้วจะทำให้เจอปัญหา ตามข้อความด้านล่างนี้
Firefox
Edge ,Google ChromeWarning: Potential Security Risk Ahead
Firefox detected a potential security threat and did not continue to domain.com . If you visit this site, attackers could try to steal information like your passwords, emails, or credit card details.
วิธีแก้คือ เข้าไปที่เมนูYour connection isn't private
Attackers might be trying to steal your information from domain.com (for example, passwords, messages, or credit cards).
NET::ERR_CERT_AUTHORITY_INVALID
หน้าจัดการโดเมน >> vHost Conf
ลบโค้ด ส่วนของ context / {...} ตามที่ได้ใส่ในข้อ 1 ออกไปก่อน
แล้ว ไปที่เมนู
SSL >> Manage SSL
เลือกเว็บไซต์ที่ต้องการ Gen SSL กดปุ่ม Issue SSL
ตามตัวอย่าง หลังจากนั้นตรวจสอบโดยเข้าเว็บของเราดูจะสามารถเข้าด้วย https ได้แล้ว
หลังจากนั้น เราแก้ vHost Conf อีกครั้ง โดยเพิ่มโค้ด context / {...} กลับเข้าไป
แล้วเข้าไปที่
Server Status >> LiteSpeed Status
กดปุ่ม
Reboot Litespeed
เท่านี้เราก็จะสามารถเข้าใช้งานเว็บที่เขียนด้วย Node.js รันผ่าน SSL เข้าผ่าน https://.. ได้แล้ว