Category Archives: Tutorial

Migrasi massal akun antar server cpanel

Step 1. Buat backup di server lama tanpa homedir, copy ke server baru dan delete backup setelah dicopy. for x in `ls -A1 /var/cpanel/users/`; do /scripts/pkgacct –skiphomedir ${x} ; rsync -aP /home/cpmove-${x}.tar.gz -e ssh root@NEW-SERVER-IP:/home/ ; rm -f /home/cpmove-${x}.tar.gz ; done Step 2. Lakukan restore backup di server baru for x in `ls -A1 /home/cpmove*`… Read More »

modsec rule to stop xmlrpc attack

Lots of attacks are made towards WordPress XML-RPC (xmlrpc.php), which can cause a slowdown in the server. Below is the modsec rule to stop xmlrpc attack: #Block requests to xmlrpc.php with no referring URL SecRule REQUEST_METHOD “POST” “deny,status:401,id:5000900,chain,msg:’xmlrpc request blocked, no referer'” SecRule &HTTP_REFERER “@eq 0” “chain” SecRule REQUEST_URI “xmlrpc.php”

Konversi tabel InnoDB ke MyISAM

Untuk menjaga performansi server terutama agar mysql tidak overload, salah satunya adalah dengan menggunakan default MyISAM tabel dengan menambahkan field skip-innodb pada /etc/my.cnfBila sudah ada tabel yang terlanjur menggunakan format innoDB dapat dikonversi ke MyISAM dengan cara: ALTER TABLE table_name ENGINE = MyISAM;