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.
No Expires for Misc folder
I am trying to get better rating from YSlow. The tool is reporting, that the files in my misc folder Misc don't have expire header.
# (no expires) http://uhaaa.net/misc/collapse-fix.js
# (no expires) http://uhaaa.net/misc/compat-1.0.jsI was trying different combinations to make this folder with right headers, but without success.
Please, give me idea how to do this.
Adding this in nginx.conf didn't help
location ^~ /misc/ {
access_log off;
expires 30d;
}Nginx with Parallel CDN?
Hello!
I've installed successfully Nginx with Drupal and FastCGI, But I am trying to achieve better loading times with parallel downloading of site elements.
So I've installed Parallel and now I have cdn1.example.com, cdn2.example.com and cdn2.example.com
They serve images, CSS and JS.
My question is - how to avoid duplicate content? Now if I visit cdn1.example.com I can see everything from example.com
Is there way to do this in settings.php or in Nginx configuration?
Suggestion for performance nginx setup in CentOS 5.3
Hello,
Maybe next week I will setup a dedicated server.
Server hardware:
Dual core ATOM 330
2GB RAM
Swap: 2.2GB
OS: CentOS 5.3
Drupal:
-Use MySQL DB
-Use boost
(some of my website use statistic, some not, but all use boost)
-Lots of anonymous user, with high read & low write
For this serer, what I want is:
-highest request/sec
-lowest RAM & CPU usage
Below is what will I do, but because I dont have experience in nginx, so I hope there will be suggestion (Which one has duplicated function and can be ignored, or not enough something...)
Read morenginx with memcache
I've got a reasonably busy server which was running nginx with memcache (approx 2000 concurrent users, mostly anonymous users viewing pages).
It was running nginx with memcache - apparently happily, but I don't have any benchmarks from that time.
I updated Drupal to 6.15, plus a shed load of modules - not the memcache module, but that appears to be only a gui anyway.
Now, if I set the following in the settings.php file, the site goes offline immediately. It won't come back until I remove the setting;
$conf = array(
'cache_inc' => './sites/all/modules/memcache/memcache.inc',
Config nginx with Boost?
Follow this node: http://groups.drupal.org/node/26363
I use this sitting with my nginx with boost but when start nginx ,it said :
I use this sitting but when start nginx ,it said:
duplicate location "/" in
## 6.x starts
location / {
#rewrite ^/(.*)/$ /$1 permanent; # remove trailing slashes - disabled
try_files $uri @cache;
}
How can i soldve this ?
And how to convert any .htaccess to nginx config?I want to know the basic rule for this?
Thanks!
<
blockquote>
#
Read moreCan we browse another drupal installation in subdirectory of a domain?
Hi, Im not Nginx user, but I need to ask before setting up nginx for my drupal website
I need to have my domain.tld running, which means in the domain.tld folder is Drupal installation.
So I will see my website when I browse http://www.domain.tld/
But I have a folder with name "app1" which contains another Drupal installation.
So I will see another Drupal installation when I browse http://www.domain.tld/app1/
I dont want to setup subdomain because this way is far easier and dont need other codes in config file.
This works fine in Apache2, but not works in lighttpd
Read moreGitHub Project - Nginx configuration for Drupal and Aegir
There are many ways to use Nginx. With Aegir and Boost compatible configuration, without all that Aegir and Boost related stuff, with subdirectory install, compatible with Purl and Spaces, and many different modules, where some specific rewrites are required.
It is always handy to have something tested and working as default setup, but there is also room for improvements, different setups, and it seems GitHub fork feature would be useful to create and maintain different configuration examples for wider audience.
Read moreNginX, Multisite and Rewrite rules
I'm looking for some help with rewrite rules and multisite. I would like to have the following set up:
- The "Main" Drupal site, hosted at www.example.com and with all of its modules and themes at /sites/example.com
- A "Sub" Drupal site, hosted at www.example.com/subsite and with all of its modules and themes at /sites/example.com.subsite
So far #1 works beautifully with the following rewrite rule:
location / {
root /www/example;
index index.php index.html;
if (!-e $request_filename) {
Read more Nginx, Drupal and Xsend Support
I've been looking at a project where I'm going to use "private files" to make sure that only certain people can download certain files. I'd heard that this method was slower, since the web server can't serve the file directly. Instead it has to go through php.
Read moreNginX VirtualDocumentRoot configuration
There is an excellent article on the Drubuntu group about setting up Apache for use in a local development environment. The best thing about it is the clever use of Apache's VirtualDocumentRoot parameter which allows you to set up an infinite number of sites, using just one Apache Virtual host, greatly reducing the time involved with setting up yet another local development site as part of you local multisite development environment. I can simply create a new directory, a symlink and a local hosts entry and I'm up and running with a new site.
eg.
Read moreNginx Benchmarking
mikeytown2 and I hijacked my nginx built-in caching thread for some benchmarking discussions. Mostly Boost vs Varnish vs. Nginx caching. It needs its own thread.
My quick and dirty ab testing on my home "dedicated" server is at http://groups.drupal.org/node/26485#comment-101296 with a couple more using keepalives is at http://groups.drupal.org/node/26485#comment-101518.
Read moreNginx+fcgi or Nginx+Apache/mod_php
Most of the time that I read about people using Nginx with Drupal, they are talking about using it to serve static files, whist passing the php stuff off to an Apache/mod_php backend. Personally, I use Nginx as the front end with fastcgi handling the PHP stuff. What is generally considered to be the 'better' approach? Is one more capable than the other at serving php?
Read moreHas anyone tried nginx caching with Drupal?
There's been some great work on the Boost module lately with a lot of functionality added, especially the pre-caching crawler. And combined with nginx's speed advantage over apache serving static files, it's a great combination.
However, nginx does have built in caching. I've never used it, but I've seen some folks discussing how to do it on the mailing list. Has anyone used it for Drupal?
Read moreAegir and Nginx Tips and Tricks
While there are many Aegir related tips and documentation available, including scripts for complete Aegir system install on LAMP stack, we often have clients using Aegir the first time on their new VPS, but with enough experience to manage and transfer Drupal sites, and they often tend to overlook some required steps, they still make simple mistakes, or feel lost in a too detailed how-to, so I think it can be useful to post also some simple check-lists to make the work easier for others and to help enjoy Aegir power and
Read moreDoes Aegir Hosting System work with Nginx? [outdated and replaced by Barracuda & Octopus]
NOTE: this is an old thread, with now outdated information regarding using Nginx with Aegir. While as a standalone Nginx configuration it may still work fine, it was greatly improved in the meantime and now Nginx is natively supported in Aegir, no more hacks/patches etc. You can install (and upgrade) Aegir based on Nginx, with all enhancements thanks to available now Barracuda & Octopus installers, hosted on GitHub and Gitorious: https://github.com/omega8cc/nginx-for-drupal and http://gitorious.org/aegir/barracuda-octopus.
--------
The shortest answer is: YES.
Read morePHP FastCGI with Nginx? The answer: PHP-FPM server
Do you still use spawn-fcgi with Nginx? It's time to consider PHP-FPM.
PHP in the form in which it is available from php.net has a number of well-known issues associated with the use of the FastCGI SAPI in production. See this comparison chart of problems and how php-fpm handles them, when enabled with the FastCGI SAPI.
Features available only in PHP-FPM:
Read more
