Hufff, beberapa waktu lalu project standalone web server finished and running well [project thank you]. Karena memang tidak untuk public saya tidak melakukan instalasi modul security a.k.a mod_security. Selama seminggu lebih server dengan canonical name amoeba ini running di local area network [IP Private]. Setelah mendapati request dari temen untuk melakukan demo instalasi joomla akhirnya amoeba saya pindahkan ke IP Publik dan visible for everyone. Masalah terjadi disini, sehubungan dengan security reason akhirnya saya mengintalasi mod_security agar amoeba bisia ditinggal tidur nyenyak

. Namun beberapa rule yang ada didalamnya justru melakukan blocking terhadap fungsi yang ada di CMS joomla..
Hari ini saya bermaksud mengubah tampilan template dari website
Solusi Smart Informatika yang kebetulan di uji coba di server amoeba dan saya sendiri mencoba untuk mendeploy web tersebut. Masalah muncul ketika saya hendak mengedit index.php dati template yang ada melalui administrator backend, oya..., saya menggunakan Joomla versi 1.5.14 stable. Pesan error yang saya dapati adalah:
"Cannot process request!
The server does not support the action requested by the browser.
The server does not support the action requested by the browser.
If you think this is a server error, please contact
the
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
.
Error 501
Server at www.solusismart.com
Hm...., okay.., seperti biasanya log error menjadi langganan ketika menemui masalah-masalah:
$ sudo tail -f /var/log/httpd/solusismart_error_log
[Sun Oct 11 15:04:09 2009] [error] [client 10.59.209.43] ModSecurity: Access denied with code 501 (phase 2). Pattern match "(?:\\b(?:(?:n(?:et(?:\\b\\W+?\\blocalgroup|\\.exe)|(?:map|c)\\.exe)|t(?:racer(?:oute|t)|elnet\\.exe|clsh8?|ftp)|(?:w(?:guest|sh)|rcmd|ftp)\\.exe|echo\\b\\W*?\\by+)\\b|c(?:md(?:(?:32)?\\.exe\\b|\\b\\W*?\\/c)|d(?:\\b\\W*?[\\\\/]|\\W*?\\.\\.)|hmod.{0,40}?\\+.{0,3}x))|[\\;\\|\\`]\\W*? ..." at ARGS:filecontent. [file "/etc/httpd/modsecurity.d/modsecurity_crs_40_generic_attacks.conf"] [line "133"] [id "950006"] [msg "System Command Injection"] [data ";\\x0d\\x0a echo"] [severity "CRITICAL"] [tag "WEB_ATTACK/COMMAND_INJECTION"] [hostname "www.solusismart.com"] [uri "/administrator/index.php"] [unique_id "QeAtmMoeskADkkOZZZSLH"]
Dari logging diatas maka ada indikasi bahwa eksekusi penyimpanan file index.php di /templates/mysite/index.php dideteksi sebagai serangan injeksi sehingga request tersebut diblock oleh mod_security [satpam apache]. Fiuh..., solusi untuk hal ini adalah dengan melakukan disabling terhadap mod_security, caranya adalah memberikan mark (#) pada /etc/httpd/conf.d/mod_security.conf
LoadModule security2_module modules/mod_security2.so
LoadModule unique_id_module modules/mod_unique_id.so
Sehingga menjadi:
#LoadModule security2_module modules/mod_security2.so
#LoadModule unique_id_module modules/mod_unique_id.so
And voila........, error 501 is resolved, but for the security reason please try another metode to solve this, I've tried to add local rule but still error here, may be on a week I can fixed error 501 with mod_security enabled
.