OpenLiteSpeed | 1412 https://xvlnw.com I'm on my way Tue, 09 Mar 2021 12:09:10 +0000 th hourly 1 https://wordpress.org/?v=5.5.13 การใช้ .htaccess เปิดใช้งาน lscache ใน Litespeed https://xvlnw.com/topic/811 Tue, 09 Mar 2021 12:08:47 +0000 https://xvlnw.com/?p=811 โค๊ดอย่างง่าย สำหรับเปิดใช้งาน lscache ด้วย .htaccess ครับ วิธีตรวจสอบ ใช้ลองใช้งาน Debug header ดู แล้วหาค่า “x-litespeed-cache:” จะโชว์ขึ้นมา แสดงว่าโค๊ดเริ่มทำงานแล้ว จากตัวอย่างด้านบน คือทำการตั้งค่าแคชไว้ที่ 3600 วินาที หรือ 1 ชั่วโมงครับ

The post การใช้ .htaccess เปิดใช้งาน lscache ใน Litespeed first appeared on 1412.]]>
โค๊ดอย่างง่าย สำหรับเปิดใช้งาน lscache ด้วย .htaccess ครับ

<IfModule LiteSpeed>
RewriteEngine On
CacheEngine on esi crawler
CacheEnable public /
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteRule .* - [E=Cache-Control:max-age=3600]
</IfModule>

วิธีตรวจสอบ ใช้ลองใช้งาน Debug header ดู แล้วหาค่า “x-litespeed-cache:” จะโชว์ขึ้นมา แสดงว่าโค๊ดเริ่มทำงานแล้ว

จากตัวอย่างด้านบน คือทำการตั้งค่าแคชไว้ที่ 3600 วินาที หรือ 1 ชั่วโมงครับ

The post การใช้ .htaccess เปิดใช้งาน lscache ใน Litespeed first appeared on 1412.]]>
Auto Restart OpenLiteSpeed เมื่อมีการเปลี่ยน Rule ใน .htaccess ใน DirectAdmin https://xvlnw.com/topic/805 Mon, 15 Feb 2021 18:23:50 +0000 https://xvlnw.com/?p=805 ข้อเสียอย่างหนึ่งของ OpenLiteSpeed คือ หากเรามีการอัพเดตข้อมูลในไฟล์ .htaccess และต้องการให้มันทำงาน เราจะต้องทำการ Restart OpenLiteSpeed ทุกๆครั้ง เพื่อทำการ Reload ค่าใหม่ กรณีใช้งาน OpenLiteSpeed กับระบบ DirectAdmin ผู้ดูแลระบบที่เจอปัญหาผู้ใช้งานแก้ไข .htaccess แล้วไม่ทำงาน สามารถตั้ง Cronjob เพ…

The post Auto Restart OpenLiteSpeed เมื่อมีการเปลี่ยน Rule ใน .htaccess ใน DirectAdmin first appeared on 1412.]]>
ข้อเสียอย่างหนึ่งของ OpenLiteSpeed คือ หากเรามีการอัพเดตข้อมูลในไฟล์ .htaccess และต้องการให้มันทำงาน เราจะต้องทำการ Restart OpenLiteSpeed ทุกๆครั้ง เพื่อทำการ Reload ค่าใหม่

กรณีใช้งาน OpenLiteSpeed กับระบบ DirectAdmin ผู้ดูแลระบบที่เจอปัญหาผู้ใช้งานแก้ไข .htaccess แล้วไม่ทำงาน สามารถตั้ง Cronjob เพื่อให้เช็คได้ดังนี้ครับ

*/3 * * * * root if ! find /home/*/domains/*/*_html/ -maxdepth 2 -type f -newer /usr/local/lsws/cgid -name '.htaccess' -exec false {} +; then /usr/local/lsws/bin/lswsctrl restart; fi* * root if ! find /home/*/domains/*/*_html/ -maxdepth 2 -type f -newer /usr/local/lsws/cgid -name '.htaccess' -exec false {} +; then /usr/local/lsws/bin/lswsctrl restart; fi
The post Auto Restart OpenLiteSpeed เมื่อมีการเปลี่ยน Rule ใน .htaccess ใน DirectAdmin first appeared on 1412.]]>
cf-edge-cache: cache,platform=wordpress https://xvlnw.com/topic/781 Tue, 08 Dec 2020 11:20:51 +0000 https://xvlnw.com/?p=781 หลังจากที่เปลี่ยนมาใช้ LiteSpeed Enterprise พบว่าการส่ง Header จาก Cloudflare เปลี่ยนไป การแคชข้อมูลเป็บแบบสำหรับ Cloudflare WordPress Caching โดยเฉพาะเลย เพราะว่าตัว Cloudflare ทำงานร่วมกับ LiteSpeed Enterprise ได้ดีนั่นเอง Header ที่ส่งกลับมา ลองดูว่าต้องมี 3 ค่านี้ส่งกลับมาที่ Client นะครับ วิธีก…

The post cf-edge-cache: cache,platform=wordpress first appeared on 1412.]]>
หลังจากที่เปลี่ยนมาใช้ LiteSpeed Enterprise พบว่าการส่ง Header จาก Cloudflare เปลี่ยนไป การแคชข้อมูลเป็บแบบสำหรับ Cloudflare WordPress Caching โดยเฉพาะเลย เพราะว่าตัว Cloudflare ทำงานร่วมกับ LiteSpeed Enterprise ได้ดีนั่นเอง

Header ที่ส่งกลับมา

cf-edge-cache: cache,platform=wordpress
x-litespeed-cache: hit
cf-cache-status: HIT

ลองดูว่าต้องมี 3 ค่านี้ส่งกลับมาที่ Client นะครับ วิธีการเช็ค Header ง่ายๆ ก็ใช้ Command line : curl

curl -Iv https://cloudhost.in.th

สำหรับการทดสอบกับ OpenLiteSpeed จะไม่พ่น cf-edge-cache ออกมาครับ ซึ่งก็คาดว่าจะรองรับเฉพาะเวอร์ชั่น LiteSpeed Enterprise เท่านั้น

สำหรับใครที่อยากจะเซตแบบนี้ CloudHost.in.th มีบริการเซตให้ฟรี รองรับ 1 Domain เท่านั้น ดูบริการ Cloud Server สำหรับ WordPress Hosting ได้ที่ลิงก์ด้านล่างนี้

The post cf-edge-cache: cache,platform=wordpress first appeared on 1412.]]>
แก้ไขปัญหา OpenLiteSpeed ไม่รองรับ HTTP3/QUIC https://xvlnw.com/topic/684 Mon, 19 Oct 2020 10:45:30 +0000 https://xvlnw.com/?p=684 สำหรับผู้ที่ใช้งาน OpenLiteSpeed เวอร์ชั่นล่าสุดอยู่ ซึ่ง ณ​ วันที่เขียนบทความนี้ เป็นรุ่น OpenLiteSpeed 1.7.5 ปรากฏว่า เมื่อเรา Validate HTT3 ที่เว็บไซต์ https://http3check.net/ แจ้งข้อความไม่รองรับ HTTP3 วิธีการแก้ไขสำหรับ DA ให้ทำการ Downgrade ไปใช้เวอร์ชั่น OpenLiteSpeed 1.6.13 แทนนะครับ Update:…

The post แก้ไขปัญหา OpenLiteSpeed ไม่รองรับ HTTP3/QUIC first appeared on 1412.]]>
สำหรับผู้ที่ใช้งาน OpenLiteSpeed เวอร์ชั่นล่าสุดอยู่ ซึ่ง ณ​ วันที่เขียนบทความนี้ เป็นรุ่น OpenLiteSpeed 1.7.5 ปรากฏว่า เมื่อเรา Validate HTT3 ที่เว็บไซต์ https://http3check.net/ แจ้งข้อความไม่รองรับ HTTP3 วิธีการแก้ไขสำหรับ DA ให้ทำการ Downgrade ไปใช้เวอร์ชั่น OpenLiteSpeed 1.6.13 แทนนะครับ

cd /usr/local/directadmin/custombuild
echo "openlitespeed:1.6.13:a944b069ac70c3e574c25def6e1d6b2f" > custom_versions.txt
./build openlitespeed

Update: แก้ไขเวอร์ชั่น 1.7.6 ได้ทำการแก้ไข Bug HTTP/3 เรียบร้อยแล้ว

The post แก้ไขปัญหา OpenLiteSpeed ไม่รองรับ HTTP3/QUIC first appeared on 1412.]]>