DirectAdmin | 1412 https://xvlnw.com I'm on my way Wed, 22 Feb 2023 16:15:48 +0000 th hourly 1 https://wordpress.org/?v=5.5.13 DirectAdmin กำหนดเวอร์ชั่นของ PHP ตามที่เราต้องการ https://xvlnw.com/topic/968 Tue, 21 Feb 2023 12:33:05 +0000 https://xvlnw.com/?p=968 สำหรับใครที่ build php แล้วไม่สามารถดาวน์โหลดไฟล์จาก File Server ของทาง DirectAdmin ได้ เนื่องจากทาง DirectAdmin ลบ PHP เวอร์ชั่นเก่าออกไป ทำให้ไม่สามารถโหลดได้ วิธีแก้ไขคือ กำหนดเวอร์ชั่นของ PHP ให้เป็นเวอร์ชั่นที่มีอยู่ใน File server ของทาง DirectAdmin เช็คได้ที่ https://files-sg.directadmin.com/s…

The post DirectAdmin กำหนดเวอร์ชั่นของ PHP ตามที่เราต้องการ first appeared on 1412.]]>
สำหรับใครที่ build php แล้วไม่สามารถดาวน์โหลดไฟล์จาก File Server ของทาง DirectAdmin ได้ เนื่องจากทาง DirectAdmin ลบ PHP เวอร์ชั่นเก่าออกไป ทำให้ไม่สามารถโหลดได้ วิธีแก้ไขคือ กำหนดเวอร์ชั่นของ PHP ให้เป็นเวอร์ชั่นที่มีอยู่ใน File server ของทาง DirectAdmin เช็คได้ที่ https://files-sg.directadmin.com/services/custombuild/

cd /usr/local/directadmin/custombuild
echo "php74:7.4.33:" >> custom_versions.txt
./build php n
The post DirectAdmin กำหนดเวอร์ชั่นของ PHP ตามที่เราต้องการ first appeared on 1412.]]>
DirectAdmin เด้งหลุด Login as User https://xvlnw.com/topic/941 Thu, 25 Aug 2022 06:19:16 +0000 https://xvlnw.com/?p=941 สำหรับ DirectAdmin ที่ล็อคอินด้วยสิทธิ์ admin และเข้าไปที่ Login as User อีกที จะมีอาการเด้งหลุดกลับมาที่สิทธิ์ admin บ่อยมากๆ ให้ทำการเพิ่มค่านี้ลงใน directadmin.conf แล้ว Restart DirectAdmin

The post DirectAdmin เด้งหลุด Login as User first appeared on 1412.]]>
สำหรับ DirectAdmin ที่ล็อคอินด้วยสิทธิ์ admin และเข้าไปที่ Login as User อีกที จะมีอาการเด้งหลุดกลับมาที่สิทธิ์ admin บ่อยมากๆ ให้ทำการเพิ่มค่านี้ลงใน directadmin.conf แล้ว Restart DirectAdmin

session_cookie_multiplier=24
The post DirectAdmin เด้งหลุด Login as User first appeared on 1412.]]>
DirectAdmin ติดตั้ง Rspamd กรอง Spam Email https://xvlnw.com/topic/915 Mon, 25 Jul 2022 16:06:09 +0000 https://xvlnw.com/?p=915 Rspamd ตัวกรองอีเมล์ขยะตัวใหม่ ที่เจ๋งและแจ่มกว่า SpamAssassin ซึ่งจะมีระบบ Report ให้เราได้ดูรายการตั้งๆที่ตัว Rspamd ทำงานด้วย แนะนำสำหรับ CentOS 7 ขึ้นไป คำสั้งติดตั้ง Rspamd หลังจากติดตั้งเสร็จแล้ว จะมีเมนู “rspamd spam filtering system” โผล่ขึ้นมาที่สิทธิ์ Admin นะครับ สามารถเข้าไปด…

The post DirectAdmin ติดตั้ง Rspamd กรอง Spam Email first appeared on 1412.]]>
Rspamd ตัวกรองอีเมล์ขยะตัวใหม่ ที่เจ๋งและแจ่มกว่า SpamAssassin ซึ่งจะมีระบบ Report ให้เราได้ดูรายการตั้งๆที่ตัว Rspamd ทำงานด้วย แนะนำสำหรับ CentOS 7 ขึ้นไป

คำสั้งติดตั้ง Rspamd

cd /usr/local/directadmin/custombuild
./build update
./build set eximconf yes
./build set eximconf_release 4.5
./build set dovecot_conf yes
./build set blockcracking yes
./build set easy_spam_fighter yes
./build set spamd rspamd
./build set exim yes
./build rspamd
./build exim
./build exim_conf
./build dovecot
./build dovecot_conf

หลังจากติดตั้งเสร็จแล้ว จะมีเมนู “rspamd spam filtering system” โผล่ขึ้นมาที่สิทธิ์ Admin นะครับ สามารถเข้าไปดูรายงานต่างๆที่ระบบทำงานได้

สำหรับ CentOS 6 หากต้องการติดตั้ง จะต้องอัพเกรด Autoconf ก่อน

# CentOS 6
wget http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
tar xzvf autoconf-latest.tar.gz;
cd autoconf-*
./configure
make
make install

และทริปเล็กๆน้อยๆ สำหรับเพิ่มประสิทธิภาพ Rspamd ให้ทำการติดตั้ง Redis Server เพิ่มเติม

pecl install redis
service redis start
service redis restart
chkconfig redis on

จากนั้น ให้ทำการตั้งค่า Rspamd ให้ใช้งาน Redis Server เพื่อทำการแคชข้อมูล เพิ่มประสิทธิภาพในการประมวลผล

nano /etc/rspamd/local.d/redis.conf

# Input here
servers = "127.0.0.1";

# Contrl + X to save

chattr +i /etc/rspamd/local.d/redis.conf

service rspamd restart

หากต้องการตรวจสอบว่า rspamd เชื่อมต่อกับ Redis Server หรือยัง ให้ทำการ Monitor Redis

redis-cli monitor

หากเห็นว่า Rspamd มีการเชื่อมต่อเข้ามาอ่านเขียนข้อมูล ก็เป็นอันเสร็จสิ้นครับ

หากต้องการกลับไปใช้ Spamassassinเหมือนเดิม ให้ใช้คำสั่งนี้

cd /usr/local/directadmin/custombuild
./build set spamd spamassassin
./build spamassassin

service rspamd stop
chkconfig rspamd off
service redis restart
The post DirectAdmin ติดตั้ง Rspamd กรอง Spam Email first appeared on 1412.]]>
DirectAdmin ใช้ ZST ในการบีบไฟล์ Backup https://xvlnw.com/topic/866 Wed, 01 Sep 2021 11:54:03 +0000 https://xvlnw.com/?p=866 ค่า Default ของระบบ DirectAdmin เมื่อเราทำการ Backup Account เราจะได้ไฟล์เป็นนามสกุล .tar.gz เราสามารถใช้ .tar.zst ได้ เพื่อลดขนาดของไฟล์ และเพิ่มความเร็วในการ Backup ด้วยวิธีการเซตดังนี้ Note: สำหรับ DirectAdmin เวอร์ชั่น 1.61.4 ขึ้นไป และสำหรับ DirectAdmin 1.62.0 ขึ้นไป จะเป็นค่า Default มาให้เลย …

The post DirectAdmin ใช้ ZST ในการบีบไฟล์ Backup first appeared on 1412.]]>
ค่า Default ของระบบ DirectAdmin เมื่อเราทำการ Backup Account เราจะได้ไฟล์เป็นนามสกุล .tar.gz เราสามารถใช้ .tar.zst ได้ เพื่อลดขนาดของไฟล์ และเพิ่มความเร็วในการ Backup ด้วยวิธีการเซตดังนี้

cd /usr/local/directadmin/custombuild
./build update
./build zstd
cd /usr/local/directadmin
./directadmin set zstd 1
./directadmin set backup_gzip 2

Note: สำหรับ DirectAdmin เวอร์ชั่น 1.61.4 ขึ้นไป และสำหรับ DirectAdmin 1.62.0 ขึ้นไป จะเป็นค่า Default มาให้เลย ไม่ต้องตั้งค่าเพิ่มเติม

The post DirectAdmin ใช้ ZST ในการบีบไฟล์ Backup 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.]]>