Nginx

Events happening in the community are now at Drupal community events on www.drupal.org.

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.

perusio's picture

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 more
jean84's picture

need 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

Read more
spacereactor's picture

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.

Read more
omega8cc's picture

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 more
stanislaw's picture

Drupal 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;

Read more
Rockland Steel's picture

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
yakovyarmo's picture

a tutorial on how to install nginx 1.*.* as reverse proxy for apache and drupal (include boost image cache and etc')?

Can anyone please explain or upload a brief tutorial on how to integrate apache with nginx as reverse proxy and still use boost and other apache module?

And what kind of cahce is better (boost or native nginx)?
(I saw a long thread about it but i kind of lost it to the end)

limudnaim

Read more
wmostrey's picture

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 more
_-.'s picture

adding 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
szczym's picture

Help reproducing 3 bugs in Omega8 stack

Could someone please confirm (reproduce) 3 bugs, im struggling with on Omega8 stack stable 8.5

  • attachments not working in OA (raport)
  • wysiwyg editor not working in pressflow (raport)
  • new client for every site (raport)

Thanx for help

Read more
spacereactor's picture

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"

Read more
jean84's picture

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$

Read more
thebuckst0p's picture

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 more
hawkbreeze's picture

perusio - 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 more
404's picture

php-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 more
rokape's picture

Memcached 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!

Read more
jayatdrupal's picture

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 more
AntiNSA's picture

How do you do your Caching with Aegir/nginx?

I Disable All views and panes caching and let nginx/bppst/cache/other modules in aegir do the caching.
44% (7 votes)
I enable views caching and disable panels caching
13% (2 votes)
I cache in both views and panels
6% (1 vote)
I cache in panels and not in views
25% (4 votes)
Other, please explain..
13% (2 votes)
Total votes: 16
descender's picture

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 more
greg.harvey's picture

WSOD 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

Read more
Subscribe with RSS Syndicate content

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: