ScaleScaleScaleScale

Tips / Nginx


Top 5 Nginx modules for Drupal

Last week we published a post called Top 5 Nginx plugins for WordPress, and today we will show you the top 5 Nginx modules for Drupal, another popular content management solution.

Drupal, same as WordPress, is a CMS made for web publishers, it allows you to setup and start working with a fully working website within minutes. If you are used to work with WordPress only, it will bring you a hole new world in terms of CMS applications, as it’s kind different from traditional WordPress installations, but that doesn’t mean it’s not powerful.

Drupal have a serious and big community of around 100k active developers around the world that are constantly working on fixing issues, bugs and adding features. With version 8.x Drupal got better caching mechanisms, fully CDN integration and is 100% compatible with reverse proxies.

And of course, Drupal is 100% compatible with Nginx, our beloved web server. That’s why today we will explore the top 5 Nginx modules so you can boost your Drupal while using Nginx web server.

Nginx modules for Drupal

1. Nginx Securelink

Nginx securelink is a Drupal module designed for people who need to handle file downloads in a private/members area.

By using securelink your Drupal file downloads will be handled and served directly using Nginx, without passing over PHP as it happens in most CMS. Another great feature of this module are the download limits (limit per IP, time based limits, limit access based on user roles) that can be set against your download files.

It also includes an Nginx config generator and a comprehensive documentation so you can easily install it on many of the most popular hosting platforms.

2. Memcache Storage

Memcache Storage module allows you to easily integrate Drupal and Memcached system daemon via PHP Memcached extension.
This module lets you export all the system cache into memory, that includes users session, pages and much more. It can also be used to store cached data of anonymous users as plain text to allow Nginx server to store cached pages for anonymous users as a plain text, so proxy servers (like Nginx with ngx_http_memcached module enabled) can get such pages directly from memcached pool and avoid heavy requests to the backend.

3. Purge

As the name suggests, Drupal’s Purge Module allows you to clear the cache content from reverse proxy solutions like Nginx reverse proxy, Varnish, Squid, etc, by sending an http PURGE request. In order to work properly, Purge module needs a custom Nginx extra module called ngx_cache_purge, which can be downloaded from here. For full configuration and detailed instructions please make sure you read the README.txt file.

4. Boost

Boost is one of the most popular Drupal modules to improve your site speed and performance. Boost provides static page caching allowing you to scale and support traffic spikes like no other solution. It’s ideal for shared hosting enviroments, but it also works on Dedicated and VPS/Cloud servers.
And if you run Drupal + Nginx, you will have 100% compatibility as Nginx is fully supported by Boost.

This drupal module will create a powerful cache, and also will compress html, css, ajax, javascript and css files for better performance. One of the best features of its cache system is the hability to set different cache lifetimes for different parts of your site.

5. Cache Expiration

This module provides allows you to configure actions upon events that will expire URLs from cache generated by reverse proxy cache solutions like Nginx, Varnish, etc it also works to set configurations for expiring URLs for internal page cache and more. It is fully integrated with other popular caching modules like: Boost, Varnish, Fastly and Purge.

Conclusion

As we’ve seen, this Nginx modules for Drupal are the most popular ones in the Drupal community right now, they allow you to have secure links over your content, set and purge memcached storage, configure additional cache and expire settings.

Remember to take a look at the official Drupal modules repo from time to time to check out if there are new modules to explore.

Popular search terms:

  • drupal nginx cache
  • drupal 8 nginx caching
  • drupal 8 nginx fastcgi caching
  • drupal 8 proxy cache nginx conf
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking