Nginx configuration for Drupal sites
Simple configuration examples for serving super fast Drupal sites on nginx. Supports multisite, imagecache, boost, advagg and more.
I have created a preferred configuration for hosting Drupal sites on the excellent nginx web server. I tend to prefer nginx over Lighttpd and/or Apache for at least over a year now and Iām extremely happy with its reliability and performance.
Apart from configuring a little more and getting used to the fact that no run-time configurations are available through .htaccess files, nginx with php-fpm is really a viable option for hosting Drupal sites.
'Nuff said, you can head over to GitHub to check out my configuration. The files have many smart ideas taken from yhager's nginx config, however I added more features and tailored the configuration to my needs.
It has the following features:
- Multisite Drupal installations
- Boost module support
- Advanced CSS/JS Aggregation support
- Supports fake CNAME-based cdns with imagecache and advagg (see previous post about null-session support on fake CDNs)
- Proper MIME types for @font-face fonts
- An overall config file structure to minimize per vhost file volume
Anyway feel free to add patches or comments: Drupal hosting on nginx