rpm

17
Mar

Adding custom modules to Nginx RPM

Skeptical babyIf you've installed Nginx from source, adding custom modules is easy. You simply recompile Nginx and include the module you want. But what if you've installed Nginx from RPM? How do you install custom module in this case? Well, you'll need to repackage RPM and although it may sound really complicated, it's not that big of a deal.

In this example, I'll explain how to include Frickle's Nginx slow cache module for caching static files. This module is excellent if your static files are stored on a slow filesystem (e.g. NFS storage, slow HDD's). To speed things up, Nginx can fetch these files once, and then cache them on a faster filesystem (e.g. local SAS/SSD). This way, Nginx will serve the files much faster and you'll minimize the network traffic.