Tips

Working config for nginx + Drupal + Boost

Self-notes...after spending a few hours researching and benchmarking various configurations. Apache is so old news.

Setup:

  • Ubuntu Lucid Lynx (10.04)
  • nginx as frontend webserver
  • Drupal served using fastcgi to phpcgi
  • ...and Drupal's Boost module.

Most of these configs is gathered from http://groups.drupal.org/node/26363.

How fast is it now? How about almost 6,000 requests/sec, with throughput around 240Mbps? Fast enough?

nginx error: 413 Request Entity Too Large

Encountered this error when I tried to upload a large file. nginx default is too small. To upload bigger file, add this line in /etc/nginx/nginx.conf, somewhere inside the http section:

http {
    ....
    client_max_body_size 20M;
    ....
}

Save, and then restart your nginx instance.

Celcom Malaysia 3G MMS settings

Self notes since I kept on jailbreaking my iPhone and reflashing my HTC Desire, and always forgot these settings:

How to enable Time Machine to backup to network disk

Time Machine with remote disk

Easy. Just follow these steps:

  1. Obviously you need another Mac to which you want to backup to, with the disk formatted as Mac OS Extended Journaled.
  2. Open Terminal from Mac you want to backup from. Issue command
  3.  sudo defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
  4. Open System Preferences → Time Machine. Click Change Disk. Your network disk should appear now.
  5. Select it, and you are good to go.

Which RBL do you use?

List of reliable RBL that we use internally and recommend to our customers.

Here goes:

  • zen.spamhaus.org
  • bl.spamcop.net
  • combined.njabl.org
  • cbl.abuseat.org
  • combined.rbl.msrbl.net
  • psbl.surriel.com
  • b.barracudacentral.org

With these RBL, combined with greylisting and a good SpamAssassin ruleset, out of combined 50,000 - 55,000 incoming email attempts daily on all SMTP servers that we monitor, only 0.05% of spam managed pass through. Pretty good!

ATSServer and mdworker consuming significantly huge amount of CPU resources

My Mac have 4-core 3.0 GHz CPU with 4 GB RAM, yet this past week or so it seems to slow down to a crawl. Switching applications become sluggish, Dashboard taking its own sweet time to appear, and the CPU meter is constantly showing 100% usage in two of the core.

L2TP IPSec server setup for Linux

Tested under: CentOS 5.2, Ubuntu Intrepid Ibex (8.10), Ubuntu Hardy Heron (8.04), both 32-bit and 64-bit flavors. 

Tested working with the following clients: Windows XP, Windows Vista, iPhone, Mac OS X Leopard.

How to fix "VMware Workstation was unable to claim the device (No such file or directory)"

I'm running Ubuntu 7.10 using custom 2.6.23.11 kernel. Somehow, starting from kernel 2.6.23, VMware was unable to properly use my Windows Mobile PDA (Atom O2 Life). Every time I plugged in the Atom, VMware will spurt out "VMware Workstation was unable to claim the device" message. The issue was actually with VMware, and not the kernel. Follow the steps outlined below to work around this bug in VMware.

Setting up Nokia phone as modem under Linux

Linux: Guide on configuring Nokia phone as GPRS / 3G / EDGE / HSDPA modem

NOTE: Some parts of this tutorial is probably outdated.

Using imapsync to backup / archieve your Gmail emails

1. Download and install the latest version of imapsync at http://www.linux-france.org/prj/imapsync/dist/. As of today, the latest version is 1.255.