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 more excuses for not using Nginx with Drupal
It's been announced that Nginx creator Igor Sysoev is setting up a company for furthering Nginx development and support.
It's good news for us. There's no more bandwith for the lame excuses some people still make in Drupal world for not using Nginx, and instead go for the status quo. Even in some projects that purport to be "advanced" and "hooked" on performance.
Read moreneed help with fpm and
I have nginx and fpm installed
i try to run a drush update:
drush pm-update
Refreshing update status information ...
PHP Warning: Got a packet bigger than 'max_allowed_packet' bytes
query: INSERT INTO watchdog
(uid, type, message, variables, severity, link, location, referer, hostname, timestamp)
VALUES
Problem with drupal 7 and nginx to unauthorised user from accessing private files
Having problem trying to protect private file and image from unauthorised users. I not sure if this is the problem with drupal core or my nginx config. My goal is setup content type with image field, file field and set a role that can access the image and file fields.
Steps taken
1.) Install a fresh drupal 7
2.) Install field permission module (http://drupal.org/project/field_permissions)
3.) goto http://mydomain.com/admin/config/media/file-system and set my Private file system path "sites/default/files/private"
4.) Default download method = Private local files served by Drupal.
Barracuda and Octopus community have new home!
The Barracuda and Octopus original threads/projects were born in the Nginx group many months ago. In the meantime the Aegir community moved to http://community.aegirproject.org, and the BOA projects moved from GitHub to Drupal.org.
I believe it is a good idea to create a dedicated BOA group here, at our Drupal home, to not hijack discussions in the Nginx group and c.a.o community, but instead extend the Aegir eco-system with specialized space, where we can concentrate on BOA specific stuff, tips and tricks and general community support.
Read moreDrupal 6 - Boost - Imagecache. FreeBSD & Apache 2.2 & PHP (as Apache module - no FastCGI) & Nginx 0.8.5.4
Please help me with my nginx.conf file.
For now only root page ("/") is working, all others give me "The page isn't redirecting properly".
I have already tryed >10 config samples and didn't have a success.
I removed .htaccess from the root of my drupal folder.
I'd love to see the answers of people who really understand nginx.conf, but not only two strings from some tutorial - I've done this stuff a lot already.
Thanks!
Here's my conf:
user www www;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
Unusual characters not loaded in Boost static cache
(Setup: Drupal 6.20, Boost 1.18, Nginx 0.7.67)
When the URL of the boosted node contain character → or 中国新闻网新闻中心, the cached node is correctly cached in the cache directory, and correctly reflecting the URL.
But when accessing the node, the uncached node loaded instead.
Below is the Nginx rules I use:
server {
server_name *.com *.net *.org;
location / {
root /var/www/html/$host;
index index.php;
set $boost "";
set $boost_query "_";
if ( $request_method = GET ) {
Read more a tutorial on how to install nginx 1.*.* as reverse proxy for apache and drupal (include boost image cache and etc')?
request_filename vs try_files
Cfr http://keen.posterous.com/your-nginx-configuration-is-probably-wrong
This post describes how in certain situations using if (-f $request_filename) {} and if (!-e $request_filename) {} can lead to unwanted behavior. A proposed solution is to use try_files $uri /index.php?$args; instead.
Is this something that applies to Drupal sites as well? Is anyone experiences these issues?
Read moreadding IPv6 to an existing IPv4-only 'high-perf' nginx ... Pressflow web-stack?
(moved from http://groups.drupal.org/node/148319)
our current web stack is an all IPv4, DIY implementation of,
nginx
multiple listeners on IPv4:80, IPv4:443
proxypass to varnish-cache on 127.0.0.1:9000
|
|
varnish-cache
listener on 127.0.0.1:9000
filter/pass to 'faux-CDN' on Apache2
'img' -> 127.0.0.1:12003
'css' -> 127.0.0.1:12002
'js' -> 127.0.0.1:12001
'...' -> 127.0.0.1:12000
|
|
apache2/mod_php,mod_deflate +
Pressflow6/memcached(cache_inc/session_inc/lock_inc)
listeners/vhosts on 127.0.0.1:1200{0,1,2,3}
Read more Help reproducing 3 bugs in Omega8 stack
After upgrading nginx from 0.8.54 to 1.0.2, getting blank page with drupal context module install
This is the error log from server
2011/05/11 17:40:02 [error] 3358#0: *1 FastCGI sent in stderr: "PHP Fatal error: require() [function.require]: Failed opening required 'context.core.inc' (include_path='.:/usr/local/lib/php') in ˆ×® on line 3" while reading response header from upstream, client: 220.255.1.81, server: mydomain.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "mydomain.com"
How to secure files folder
hello, i want to prevent people from execute php files in the files folder of drupal here my idea but its not working after restarting nginx can you correct my code please.
location ~ ^/sites/default/files/.(php)$ {
deny all;
}
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000; # By all means use a different server for the fcgi processes if you ne$
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # !! <--- Another path r$
Drupal on [nginx-based] DotCloud instances
I wrote a blog post about getting Drupal to work on an automated DotCloud instance. The main pain point I ran into was configuring the rewrite rules for nginx, so maybe this group can help.
DotCloud allows an nginx.conf file in a project root, which the server picks up when it reloads. I based mine on perusio's drupal-with-nginx project, specifically the drupal.conf and drupal7.conf files. (I tried it with both D6 and D7 and had the same issue.)
Read moreperusio - blacklist and media module.
This goes out to perusio and those using his configs.
I have been using perusio's configs and when using the media module and wysiwyg to insert images, the media picker was not loading properly. Some js, css files were failing with 444 errors. It turned out to be the referer including the string "video" which is one of the strings that when matched in blacklist.conf returns a 444.
He is my post on the media module project page.
http://drupal.org/node/1045224#comment-4339622
Dave
Read morephp-cgi/nginx returns http/0.9
When I visit content type management page and try to delete a file field or a content type contains a file field, I get a page without any css or js. I can click submit but it doesn't work (it doesn't update or delete that field).
When I proxy the page to apache, the problem doesn't show up.
I use nginx-for-drupal conf at github. I didn't add or change anything.
I disabled all the third party modules and the problem still exist.
Read moreMemcached with nginx-varnish?
I setup site d7 with varnish frontend-nginx-php-fpm backend+APC.now install memcache and memcache module.but seem not work with d7.enter admin/reports/memcache i see Page not found.
How about this?
Thanks!
Nginx reverse proxy , Apache Drupal and Boost
A nice way to add performance to your drupal site is by adding Nginx in front of your web server to act as a reverse proxy. I have summarized my configuration which puts Nginx in front of an existing Apache / drupal site. Not only can it serve images and other static files, but I have made the tweaks to the configuration file to serve up the boost cached files directly from the Nginx front end.
My testing shows it to be very, very quick. The best thing, is that it can be tested on a production server with no impact.
Read moreHow do you do your Caching with Aegir/nginx?
Nginx configs and CKFinder connector
Hi all,
I just want to alert everyone that a number of the stock/sample Nginx configs listed in this group have a problem with CKFinder, a file manager plugin for the CKEditor editor.
The gist of the problem is that the configs limit access to only a handful of PHP scripts from Drupal core such as index.php, update.php, etc. CKFinder happens to generate its interface through a certain connector.php. To solve this, you have to add access to connector.php:
Needed for CKFinder to work
location = /sites/all/modules/ckeditor/ckfinder/core/connector/php/connector.php {
Read moreWSOD issues and other problems with Nginx - anyone seen this before?
Hi all,
Relatively new to Nginx, got a few sites running on it, no problem - we're porting another site over but this one is doing a WSOD on any views pages (as well as Views admin) and refusing to load the Admin module or the Rubik theme. It's truly odd. Linux permissions seem ok (triple-checked), no other issues we can see. We're not getting any meaningful errors in the error log, just the white screen. We installed dtools to get more information and the errors coming back look exactly like this:
http://drupal.org/node/907594






