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.
Single domain, multiple cores - is that possible?
Is it possible that a number of particular paths requested from one site would be rendered by another site based on another Drupal core version without redirecting to another domain?
Read moreUsing the Drupal Maintenance Page Behind nginx
I have a site where the standard Drupal maintenance page is the simplest way to communicate short periods of down time with. our users.
The problem is that when Drupal emits a maintenance page, it attaches a status of 503. AFAICT, this is the same error status a lot of nginx configurations use to indicate that your PHP-FPM instances have passed away and ceased to pine for the fyords :-)
Read morePerformance comparison between nginx -light, -full and -extras Debian packages
Hi,
Does anyone benchmark those packages? The nginx-extras contains ngx_lua module. While it is not as heavier as mod_php, it makes me think about the performance.
Read moreGetting "Secure Pages" like behavior behind Varnish or AWS ELBs
I have a site that has both a large anonymous-use and logged-in participant usage. In an older version, the client used Secure Pages to get some pages into SSL, but to force most traffic back into regular HTTP if the page did not require it.
How best to implement this with Varnish or AWS?
Read moreNginx serving whole drupal directory - security risk?
Hello,
Read moresitemap.xml nginx problem
Hi,
After switching my site to Nginx my sitemap module stops working correctly:
http://madfanboy.com/sitemap.xml
Seems that this config doesn't work:
## XML Sitemap support.
location = /sitemap.xml {
try_files $uri /index.php?q=$no_slash_uri;
}Any suggestion?
Thanks
Read moreFail2ban rules for Nginx and phpmyadmin?
Hi,
Maybe somebody have the fail2ban rules for nginx and phpmyadmin?
To prevent brute force attack on phpmyadmin.
Apache kind of rules doesn't works on nginx:
http://www.foosel.org/blog/2008/04/banning_phpmyadmin_bots_using_fail2ban
Thanks
Read morehtpasswd doesn't works for /admin path
Hi,
It works great for really existed /admin path, but in Drupal it doesn't exist, so I cannot protect admin directory with htpasswd.
Any fix or suggestion?
Thanks
Read moreNGINX + Domain Access Module
Good Day,
I am trying to use the domain module with nginx. I followed the direction on the domain module side even adding the * wildcard dns entry. (with linode)
I added the *.mydomain.com to the config file
server_name mydomain.com *.mydomain.com;
under this configuration my site is not accessible. From my understanding this is an accepted syntax.
but if I separate the *.mydomain.com adding another entry, site becomes accessible . Now when I add more details such location and other configuration the site becomes inaccessible.
Read moreHelp needed with nginx boost/rewrite rules..
Hello all,
For the moment im using nginx as fronted for apache, but I'd like to get rid of the htaccess in drupal so apache doesn't use more resources then needed, but that means that i need to get boost and the rewrite rules in it, and thats the part when i got stuck.
Read morePages hit by Boost Crawler are not being cached on Nginx Reverse Proxy
I am running an Nginx reverse proxy on port 80, with Apache behind on port 81. I do not have nginx set up to serve boost cache files, only static assets.
If I hit port 80 from my browser, or curl on the box itself, it generates a cached file. However the crawler fails to generate a file, despite Apache access log suggesting the crawler is regularly hitting pages (the site is not public, access is only allowed for IP exceptions).
Read moreNGINX and SSL
Hi All,
I know this is me missing something, so please bear with me. I have been using Apache for years and have decided to take the plunge to Nginx. I have set it up and it works fine. The problem comes when I want to use SSL.
I want to make it so that you have to login via HTTPS and once logged in it keeps you on HTTPS. I have done this under Apache lots of times so didn't think it would be an issue.
Anyway, I created my config files, pointed the browser to https://mysite.com and it worked fine. You enter your login details, and it then goes back to http.
Read moreNginx + VirtualHost + Drupal 7.14 + Clean URLS
I can't manage Clean Urls to work on Nginx. I try diffrent tutorials over the net but still no result.
/etc/nginx/sites-enabled/sweetdreams
You may add here your
server {
...
}
statements for each of your virtual hosts to this file
#
You should look at the following URL's in order to grasp a solid understanding
of Nginx configuration files in order to fully unleash the power of Nginx.
http://wiki.nginx.org/Pitfalls
http://wiki.nginx.org/QuickStart
http://wiki.nginx.org/Configuration
#
Read morenginx clean urls and image styles..
Hi folks,
I've been banging my head on that one for a fex days now!
Basically clean urls test fails in admin/config/search/clean-urls which I assume is normal in a nginx environment (?)
No biggy as I force it in setting.php
When clean urls are turned on everything works as expected but image styles.
images are getting uploaded in sites/default/files as one would expect, but are not being generated when I visit the page.
My assumption is that something is broken with clean urls.
Read moreGetting PHP-FPM to talk to syslog on Ubuntu
I'm working on a couple of applications that will deploy on EC2, and we're having a hell of a time getting error output (calls to error_log(), php errors, etc.) sent to anything but a text error log.
Any ideas as to what the issue is here? Is this even possible right now with php5-fpm and nginx????
Here's what I've tried.
Going to a text log is easy enough if we put
error_log = /some/damn/path/error.loginto a pool configuration for php5-fpm on Ubuntu (11.10 at the moment).
So if I do
<?php
What server ressources to run a Drupal with Nginx
Hi every body,
I look close the main configurations for Nginx (mainly omega8cc and perusio) and I'm wondering to know which kind of ressrouces server is required to run a Drupal with theses configurations.
My hosting company allow me to create quickly a virtual server with a distrib of my choice but with 1 processor, 256M of RAM and 8Go disk (3 used for the system).
As I saw, the both configs set 4 worker_proccess for Nginx, and the documentation say that number should be equal to the number of processors.
Read moreNginx and Varnish
Hi,
Can somebody show me an example of config Nginx+Varnish? It is complicated to make them work together?
I use Perusio's Nginx config and I must switch from Boost to Varnish...
Thanks
Read moreNginx and Quicktabs = Ajax problem
Hi,
Views ajax pager works fine with Nginx. But not in Quicktabs.
If I choose Ajax pager in Quicktabs module the links looks like:
http://mysite.com/views/ajax?page=0%2C0%2C0%2C0%2C1&view_name=Best_Month...
When I click on it I see the white page with some text.
Read moreCache Warmer Customizations
Hi, we are using "cache_warmer" module to make HTTP requests to some (a lot of) pages
so BOOST cache files are created and our cache is always fresh and warm.
We use only the HUB PAGES file.
We are having problems trying to crawl pages in PARALLEL mode, but not in SINGLE mode.
-
Problem_1
In our site, we redirect all anonymous users to a Welcome page if they don't have a "saw_welcome" Cookie (which is set after visiting that page). -
Problem_2
We have some paths we want to crawl that use parameters in the URL like the following examples:
nginx domain redirection problem
hi,
i have managed to get a site up but am experiencing problems with redirecting my domain from www.example.com to example.com.
my dns records are as follows
example.com A ipaddress
www.example.com A **ipaddress***
And my vhost server section is as follows
server_name example.com www.example.com;
The problem is when you visit www.example.com you get the text but no css, js or images but when you visit example.com all works well. i have also tried a redirect as suggested by Perusio in another discussion but this didn't help.
Read more



