
- April 21, 2025
- 5:10 pm
วิธีติดตั้งและตั้งค่า OpenLiteSpeed บน aaPanel
การติดตั้งและตั้งค่า OpenLiteSpeed บน aaPanel อย่างละเอียด สามารถทำตามขั้นตอนได้ดังต่อไปนี้
1. ติดตั้ง OpenLiteSpeed บน aaPanel
1.1 ติดตั้ง aaPanel
หากคุณยังไม่ได้ติดตั้ง aaPanel บนเซิร์ฟเวอร์ Ubuntu 22.04 ให้ทำตามขั้นตอนนี้
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh
เมื่อการติดตั้งเสร็จสมบูรณ์ ระบบจะแสดง URL, Username และ Password สำหรับเข้าสู่ aaPanel
กรณีใช้งาน Cloud Private Hosting ระบบจะติดตั้ง aaPanel ให้อัตโนมัติ Username และ Password จะแสดงในหน้า Cloud Console ของผู้ใช้งาน
1.2 ติดตั้ง OpenLiteSpeed ผ่าน aaPanel
- หากคุณยังไม่ได้ติดตั้ง aaPanel บนเซิร์ฟเวอร์ Ubuntu 22.04 ให้ทำตามขั้นตอนนี้
เข้าสู่ aaPanel Dashboard(http://your-server-ip:7800)
- ไปที่เมนู “App Store”
- ค้นหา “OpenLiteSpeed”
- คลิก “Install”
หลังจากติดตั้งเสร็จ ให้ตรวจสอบว่า OpenLiteSpeed ทำงานโดยรัน:
systemctl status lsws
2. ตั้งค่า OpenLiteSpeed บน aaPanel
2.1 เข้าสู่หน้าแอดมินของ OpenLiteSpeed
เปิดเบราว์เซอร์แล้วไปที่:
http://your-server-ip:7080
- ล็อกอินด้วย Username: admin และรหัสผ่านที่ตั้งค่า
- เปลี่ยนรหัสผ่านแอดมิน (แนะนำให้เปลี่ยนเพื่อความปลอดภัย):
/usr/local/lsws/admin/misc/admpass.sh
ใส่ Username และรหัสผ่านใหม่
2.2 ตั้งค่า Virtual Host สำหรับเว็บไซต์
1.เข้าไปที่ WebAdmin Console (http://your-server-ip:7080)
2.ไปที่ “Virtual Hosts” > “Add”
3.ตั้งค่า:
- Virtual Host Name: mydomain.com
- Virtual Host Root: /www/wwwroot/mydomain.com
- Config File: /usr/local/lsws/conf/vhosts/mydomain/vhconf.conf
- Follow Symbolic Link: Yes
2.3 ตั้งค่า PHP และ FastCGI
1.ไปที่ WebAdmin Console
2.ไปที่ “Server Configuration” > “External App”
3.คลิก “Add” และเลือก FastCGI App
4.กรอกข้อมูล:
- Name:
php
- Address:
uds://tmp/lshttpd/lsphp.sock
- Max Connections:
35
- Environment:
PHP_LSAPI_CHILDREN=35
- Command:
/usr/local/lsws/lsphp80/bin/lsphp
5. กด Save และ Restart
ทดสอบ PHP โดยสร้างไฟล์ info.php
ใน/www/wwwroot/mydomain.com/
echo "<?php phpinfo();" > /www/wwwroot/mydomain.com/info.php
เปิดเบราว์เซอร์ไปที่ http://your-server-ip/info.php
2.4 ตั้งค่า SSL (HTTPS) บน OpenLiteSpeed
ติดตั้ง Let’s Encrypt SSL ผ่าน aaPanel
- ไปที่ aaPanel Dashboard > Website
- เลือกโดเมนของคุณ > คลิก SSL
- เลือก Let’s Encrypt > คลิก Apply
หรือใช้คำสั่ง Terminal:
certbot certonly --webroot -w /www/wwwroot/mydomain.com -d mydomain.com -d www.mydomain.com
หลังจากติดตั้งแล้ว ให้เพิ่ม SSL ใน WebAdmin Console:
ไปที่ Listener > HTTPS > SSL
ใส่ไฟล์ cert.pem และ privkey.pem
Restart OpenLiteSpeed
3. การจัดการ OpenLiteSpeed บน aaPanel
3.1 รีสตาร์ทหรือหยุด OpenLiteSpeed
systemctl restart lsws # รีสตาร์ท
systemctl stop lsws # หยุด
systemctl start lsws # เริ่มต้นใหม่
3.2 ตรวจสอบสถานะ
systemctl status lsws
3.3 อัปเดต OpenLiteSpeed
apt update && apt upgrade -y
4. ทดสอบและตรวจสอบ
ตรวจสอบว่า OpenLiteSpeed ทำงานผ่านเบราว์เซอร์:
- HTTP :
http://your-server-ip
HTTPS :
https://your-server-ip
WebAdmin Console :
http://your-server-ip:7080
ทดสอบไฟล์ info.php
เปิด
http://your-server-ip/info.php
ควรแสดงข้อมูล PHP
สรุป
✅ ติดตั้ง OpenLiteSpeed บน aaPanel
✅ ตั้งค่า Virtual Host, PHP และ SSL
✅ พร้อมใช้งานสำหรับโฮสต์เว็บไซต์
หากคุณต้องการใช้ LiteSpeed Cache ให้ติดตั้งปลั๊กอิน LiteSpeed Cache ใน WordPress หรือ CMS ที่ใช้งาน
- Categories:
- Manual
- Tags:
- OpenLiteSpeed
หมวดหมู่ที่น่าสนใจ
- Account Settings
- AD Server
- AI
- Alibaba Cloud
- AWS Amazon Web Services
- Campaign
- CentOS/AlmaLinux
- Cloud
- Cloud Backup
- Cloud Communication
- Cloud Server Management
- Cloud Solution
- Cloud Solution for Government
- Cloud Solutions by Industry
- Cloud Storage
- Cloud VPS App Plus +
- Cloud VPS DirectAdmin
- Cloud VPS Plesk
- CSR
- Cyber Security
- Database Server
- DDoS
- Digital Transformation
- Direct Mail
- Directadmin
- Domainname
- Ecommerce
- Generative AI
- Getting Started
- Google Cloud
- Google G Suite
- Huawei Cloud
- IT News
- Linux Server
- Manual
- Microsoft
- Microsoft Azure
- News
- On-premise
- Promotion
- Recommend Solution (Enterprise)
- Server
- SMS
- THAI DATA CLOUD Platform
- Ubuntu
- Ubuntu
- Uncategorized
- VPS Server
- Web Design
- Web Hosting
- Web Hosting (DirectAdmin)
- Web Hosting (Plesk)
- Web Technologies
- Windows Server
- Wordpress
- Zimbra
- เรื่องราวความประทับใจ
- โซลูชันสำหรับธุรกิจการผลิตและยานยนต์
- โซลูชันสำหรับธุรกิจการศึกษา
- โซลูชันสำหรับธุรกิจการเงิน
- โซลูชันสำหรับธุรกิจขนส่งและกระจายสินค้า
- โซลูชันสำหรับธุรกิจค้าปลีก
- โซลูชันสำหรับธุรกิจท่องเที่ยว
- โซลูชันสำหรับธุรกิจบริการสุขภาพและโรงพยาบาล
- โซลูชันสำหรับธุรกิจประกันภัย
- โซลูชันสำหรับธุรกิจพลังงานและสาธารณูปโภค
- โซลูชันสำหรับธุรกิจสื่อสารมวลชนและเอ็นเตอร์เทนเมนท์
- โซลูชันสำหรับธุรกิจอสังหาริมทรัพย์
- โซลูชันสำหรับธุรกิจเทคโนโลยี