This group is dedicated to share experiences on using Nginx as a webserver for Drupal sites. The goal is to provide community powered support for anyone looking for Nginx related advice, configuration examples and tuning. This group was born from a long thread about Nginx and Boost integration.
Nginx for Drupal configuration projects/examples:
Barracuda Aegir by omega8cc (Drupal.org)
Boost compatible by yhager (GitHub)
Idiosyncratic bleeding edge config by perusio (GitHub)
Please file issues, post patches and improvements for projects hosted on GitHub on the GitHub issue tracker.
How to enable ssl on a drupal 7 site
Hi everybody,
I have a VPS which is running Ubuntu with NGINX.
I have just created a Drupal Commerce site where I would like to enable SSL for the checkout procedure. So I would like to enable SSL for this site and limit the secure pages to only those during checkout. I am using the PayPal WPP - credit card, payment method and any help would be much appreciated.
Thanks for your time.
Chris
Read moreFor those (misguided ;) souls that still
Is Drupal on nginx ready for prime time?
Hi,
Is nginx ready to run Drupal production sites with all the features usable?
or is it still a lot of trial and error to get it working??
Reason I ask is that I am looking at moving to php-fpm anyway and on a quick test have already had issues with clean URL's.. Since there is very little information around on running Apache with PHP-FPM and even less with Drupal as well it might be a time to look at nginx..
My concern is that I don't want to spend my life "tweaking" it every time I add a new module or want to enable a new feature..
Read moreSome Drupal Nginx Help Please
Hello,
I am setting up a new server to move some of my drupal sites to. I'm trying to switch everything over to nginx, php-fpm, etc. I have everything setup and have used perusio's scripts extensively. I can see the php-fpm status pages, I can reach the domain - in this case http://contemplativechristianliving.com/ - but I cannot get any actual drupal pages to show up... What I see in the error logs are endless entries such as:
Read moreSelective caching with nginx, Drupal and the ESI module
We all know that caching in its many forms can speed up your site tremendously, while also lowering your hardware requirements. Until now these caching solutions mostly involve caching a full page of data. However, progress is being made with selectively caching only portions of a page, giving the benefits of caching while varying the freshness of different portions of a given page, or allowing some data to be served in real time.
Read moreSimple D7 site with nginx as web server AND nginx as cache for php - a few questions
I have a very simple setup with a drupal site where I am the only one logging in and writing content. There is no anon user input in forms or any other complicating stuff. The anon users will only be reading.
My goal is to make the site as fast as possible for anon users and able to serve as many anon users as possible. The content I write does not change very often.
I am using nginx as a web server and PHP-FPM for PHP FastCGI. I am not using apache at all.
I also want nginx to leave PHP alone as much as possible. To cache the content of PHP.
Read moreNginx HTTP concat module
This might be of interest to you.
Of course there's a Drupal module to be made. This will void most of the issues around CSS and JS aggregation. Making it simpler and more
efficient. Nothing beats C for speed and efficiency.
The module should work also with modconcat, that is, if you're still using that type of legacy web server technology ;)
Read moreNginx/Boost setup - logins only working on second Try
I've set up a D7 site with Nginx and to accelerate the site Boost as well. I've used the config by omega8cc though not using aegir/barracuda - wanted it to be a bit easier at the beginning.
Now whenver users want to log in to the site the on the first log in (site is running in https completely), after entering their username and password they get thrown back to the same page without success - username and password field empty. So apparently Boost didn't recognize the post correctly, serving a cached page.
However, when the user tries to login again - he succeeds.
Nginx as Apache Reverse Proxy - Lightbox2 Server Handling
I recently had some time to experiment with nginx as a reverse proxy for Apache, and so far I'm very pleased with the results. A big thanks to Perusio for his configuration files; they were a great basis to start from.
Read moreTrying to use nginx w/ drupal on dreamhost VPS - PHP/FastCGI crashes
I've been fairly happy w/ dreamhost and I like having their support team behind me. But - every time I try out nginx fastcgi/PHP crashes after several hours and the site goes down. I wonder if anybody here has seen this or has some ideas.
Read moremacports install on Lion and DRUPL_HOME/admin/config load very slow
I use macports to installed Nginx and php-cgi on my MacBook Air Lion and deployed Drupal 7.
Everything is fast except DRUPL_HOME/admin/config. That page needs 3s to load while other pages just show as soon as I click the link.
Anyone got the same problem on Mac?
Disabling Caching Per Node Type
I'm currently using omega8 hosting with nginx and all that sped-up goodness. I'm developing a bunch of stuff with node.js integration now, and I have a chat node that needs to have caching disabled. Basically a user can chat live and all that via node.js backend but when they reload the page it's pulling the cached page a not the recent chat.
So how would one go about disabling caching for a single node type, for example?
I saw something about: header('X-Accel-Expires: 0'); in the nginx google group forums but I'm really sure how or where to apply this in my module.
Read moreNginx cipher suite vulnerability mitigation, cipher suite order, optimizations, and questions!
I was following a thread from an earlier post from perusio, but decided that starting a new thread on developing best practices for nginx https security.
Two of the links from that thread was good to know about; the one for startssl free certs, and the link for ssl testing from SSL Labs.
Read moreNeed help to create mobile & desktop website with nginx
Currently most detail guide focus on creating mobile website with sub-domain like m.website.com for mobile site and website.com or www.website.com as desktop site cause is easier to cache by domain but also include apache rewrite and I can't nginx mobile guide for drupal. I hope to this discussion can come out some possible solutions to use nginx and write guide to setup mobile site.
Read moreNginx Cache Sprint at Drupalcon London
Nginx has 2 caches:
-
A proxy cache when you're proxying to another HTTP server.
-
A fastcgi cache when you're "proxying" to FastCGI.
This is a native cache not an external one. Hence you can get high performance caching without the additional complexity of having another moving part on your setup. Thus making potentially making things like Varnish superfluous.
Read moreBoost problems
I'm trying to use perusio's conf files so i followed the install instructions and when I reboot nginx server I get this error:
nginx: [emerg] SSL_CTX_use_certificate_chain_file("/etc/ssl/certs/gorgeoushentai-cert.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory error:20074002:BIO routines:FILE_CTRL:system lib error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib)
So I went into the /etc/ssl/certs/ directory and gorgeoushentai-cert.pem doesn't exist so how would I make it create that file?
Read moreMonitoring traffic to multiple sites?
Is there a recommended tool/process/configuration to monitor traffic multiple sites running on nginx? I've looked at Munin's nginx plugins, but couldn't find anything that would fit the bill.
Example: Multiple sites running on a VPS with nginx. One of the sites is suddenly more popular and/or starts receiving higher traffic over time, perhaps necessitating separate VPS setup. Is there a way to parse logs or somehow monitor the traffic split amongst multiple sites?
Read morehttpload: testing tool for Nginx served sites
Tools like ab or siege are inadequate for testing sites served by Nginx (or Lighttpd). They both use threads instead of multiple processes. ab is based on the Apache Portable Runtime, hence it uses the same type of request handling at the OS level that Apache uses.
how to use a dedicated php-fpm server
I am using perusio's nginx conf for drupal.
I tried to use a php-fpm server instead of the localhost one:
step 1: edit nginx conf
# -- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" --
### Upstream configuration for PHP FastCGI.
## Add as many servers as needed. Cf. http://wiki.nginx.org/HttpUpstreamModule.
upstream phpcgi {
#server 127.0.0.1:9000;
server 129.0.0.48:9000;
}step 2: edit php5 fpm conf
On 129.0.0.48, I use the ppa:nginx repo.
I edited /etc/php5/fpm/pool.d/www.conf
Selective APC usage with nginx
I have a 256meg slice on slicehost running a drupal 6 site using nginx and APC. Everything works perfectly. However, I want to add a private site just for me and have that site not be cached by APC. I've searched online and found how to do it using apache, but not nginx. Any ideas on how to get APC to cache only the public site?
Thanks.
Read more

