Posts

Showing posts from December, 2012

Nginx and Linux Kernel Update Blues

Background We have a three-server landscape that serves our internal applications. All of them were running nginx on RHEL linux. The nginx were installed from EPEL repository packages. Two days ago I updated the nginx in one server (lets say server A) in order to repackage it after enhancing it with HttpSubsModule, during the compilation process it complains about missing kernel functionality. For the compile to be success, I updated kernel-devel and kernel packages (in server A) to the latest one. After the compilation succeeded, I copied the resulting rpm to server B and installed it. The problem After reinstalling the rpm package in server B, I didn't remember to restart the nginx server. After installing new kernel in server A, I havent restarted it either. But the next day, because of one thing and another, server A got restarted, and the application on server A no longer works. Server B's nginx server also got restarted, and afterwards unable to serve any web pages

Workflow Approval Dasar dalam Joget

Image
The case Dalam pembuatan aplikasi enterprise, banyak aktivitas yang perlu dibuat form elektroniknya. Umumnya form ini perlu menggunakan persetujuan sebelum diakui oleh perusahaan. Aplikasi jenis ini ialah aplikasi berbasis workflow, akan lebih terstruktur dan maintenable jika dibuat memanfaatkan workflow engine yang sudah ada. Salah satu workflow engine yang open source adalah Joget Workflow. Artikel ini mencoba menjelaskan tahap awal pembuatan aplikasi workflow yaitu pembuatan diagram workflow. Skenario yang didukung Dokumen request dibuat oleh aktor pembuat, kemudian disubmit ke aktor approver (umumnya atasan). Tiap aktor diperbolehkan melakukan reject dokumen. Approver dapat melakukan pengembalian dokumen (return) atau persetujuan (approve). Basic Workflow Pada workflow ini, Pembuat dapat melakukan aktivitas 'BuatDokumen'. Tombol aktivitas yang dipilih (submit , reject/cancel, atau return) diisikan ke variabel 'Keputusan'. Variabel ini menjadi dasar

Nginx Http Subs Module for CentOS - Packaging Howto

The case I recently involved in a reverse proxy project using nginx as reverse proxy server. Turns out that nginx has a built in HttpSubModule that allow us to replace urls in http stream, which is a very important requirements for us.  But the problem is that the HttpSubModule only allow one replacement per location.  After a few searches, found that an additional HttpSubsModule (notice the additional s)  will do the task, allowing multiple replacement per location.The nginx wiki is kind enough to provide installation instructions for HttpSubsModule , but provides no rpm package. DISCLAIMER: This blog post shows step by step tutorial to produce a RPM package file. If you only interested in installing nginx with HttpSubsModule, please jump to the last heading 'Installation'. But if you're not on Centos 6 x86_64, maybe you really should follow all the steps anyway. Repository Hunt I prefer repository packages other than compiling manually. We found that EPEL repo

Useless combination of logical expressions

Image
Recently I stumbled upon this SQL where clause : status <> 2  OR status <> 0 or in equivalent form for you PHP developers : (status != 2 )  || (status != 0) To analyze why such combination are useless, Lets define two variables to simplify things : A = (status <> 0) B = (status <> 2) And draw it on one table :  Then I wonder, what good does that do ? It always evaluates to true.. It only make sense if we combine the status comparisons with the and operator :