Nginx

We encourage users to post events happening in the community to the community events group on https://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.

trotsak's picture

unmet dependencies: nginx : Depends: libluajit-5.1-2

Good day!

I setup nginx at DO, Debian 7 x32. I try to install nginx.

My /etc/apt/sources.list is:

deb http://ftp.us.debian.org/debian wheezy main
deb http://security.debian.org/ wheezy/updates main
deb http://debian.perusio.net unstable/
deb-src http://debian.perusio.net unstable/

When I install nginx (aptitude install nginx) I get:

The following packages have unmet dependencies:
nginx : Depends: libluajit-5.1-2 which is a virtual package.

how can I resolve it?

Read more
MXT's picture

Redirect module doesn't works on nginx

I all,

First of all EXCUSE ME guys, I'm here after no success in other places like
https://drupal.org/node/2174961
and
http://drupal.stackexchange.com/questions/102176/redirect-does-not-work-...
and
https://github.com/perusio/drupal-with-nginx/issues/154

but I'm desperately looking for an answer. And the first knot to be untied is if my issue is due to a module incompatibility (redirect module) or a simple missing vhost configuration in nginx.

THE ISSUE:

Read more
Torenware's picture

Remote logging with nginx and php-fpm

I'm looking once again into how best to monitor a large Drupal 7 app I've deployed on AWS, using nginx and PHP-FPM (5.3.21 currently). The app uses autoscaling, and the instances often don't live very long (a day is a long time). So I need some kind of logging solution that will get my logs off the instances and into some kind of centralized store.

What are people doing for this use case?

I've noticed that more than a year after I last looked into this, PHP-FPM appears to have not committed a patch to support

error_log = syslog
Read more
spessex's picture

SSL Certificates - Advice in buying?

I'm currently looking at buying a SSL certificate and attaching to one of my domains. The main reason (along with encryption) is to provide more peace-of-mind for users who will providing their personal data (we are also signed up to data protection).

Can anyone provide any advice as I'm totally new to this, especially in regards to:

  • green bar or not (and if not do you think the average Joe will understand the site is SSL)?
  • best companies in relation to price and service?
Read more
emjayess's picture

HHVM or PHP-FPM?

The HipHop VM project announced fastcgi support, and published a couple benchmarks, as compared with php-fpm behind nginx.

I'm just curious if anyone is using HHVM and Nginx for Drupal, or has any thoughts on doing so?

Read more

Getting Started with NGINX and Drupal 7

Getting Started with Nginx & Drupal 7

This started as a discussion, but I figured we could add to it and collaborate a bit on it as a wiki instead.

So you want to use Nginx with Drupal. And you have no idea how to get started. Hopefully this’ll help.

Our lofty goal is to get Perusio’s Nginx config up and running. Hopefully in the process we'll understand more about how nginx works and how we can debug things.

Read more
rahim123's picture

Is Nginx microcaching appropriate for a Drupal forum?

Hi everyone,

I use Drupal 6 as a forum with Perusio's config on Nginx/PHP-FPM/MariaDB. There are some lines in the drupal6.conf file that deal with Nginx microcaching:

## FastCGI microcache.
#include apps/drupal/microcache_fcgi.conf;
## FCGI microcache for authenticated users also.
#include apps/drupal/microcache_fcgi_auth.conf;
Read more
splitsplitsplit's picture

Getting Started with Nginx & Drupal

Getting Started with Nginx & Drupal 7

So you want to use Nginx with Drupal. And you have no idea how to get started. Hopefully this’ll help.

Our lofty goal is to get Perusio’s Nginx config up and running. Hopefully in the process we'll understand more about how nginx works and how we can debug things.

Unfortunately I don’t understand all of it, so there’s going to be a few understanding holes here and there, but we’ll still be able to get it running.

There are plenty other ways to set-up Nginx, PHP and Drupal, this is just how I’ve done it.

Read more
johntang's picture

SA-CORE-2013-003 errors for Nginx

Hi,

I'm using perusio Nginx config, when I updated to 7.24 on my website status show errors (See on attach)

See http://drupal.org/SA-CORE-2013-003 for information about the recommended .htaccess file which should be added to the sites/default/files/private directory to help protect against arbitrary code execution.

I have viewed the issues from https://groups.drupal.org/node/377458, which one is:

If you're using any of the configs recommended on the [Nginx group] (https://groups.drupal.org/nginx) you're safe.
Read more
johntang's picture

Images are not generated on right configuration

Hello,

I'm using the right config from perusio, But images are missing from our site. It's show page not found 404. Until I comment code on drupal.conf, the problem has gone

<

pre>

All static files will be served directly.

location ~* ^.+.(?:css|cur|js|jpg|jpeg|gif|htc|ico|png|html|xml)$ {

access_log off;

expires 30d;

    ## No need to bleed constant updates. Send the all shebang in one
    ## fell swoop.

tcp_nodelay off;

    ## Set the OS file cache.

open_file_cache max=3000 inactive=120s;

Read more
splitsplitsplit's picture

Perusio Config & AdvAgg

AdvAgg has 404 problems with Perusio's config.

Someone listed the issue here, they describe the solution is to comment out:

try_files $uri
@drupal
in the AdvAgg blocks (in drupal.conf).
However this doesn't seem to have any effect. This is possibly because inside

location /{ ....}

Is the same line:
try_files $uri @drupal

And so it's inherited if you comment it out. Has anyone removed the 404 errors from AdvAgg?

Read more
rahim123's picture

Nginx + Drupal 6 (multisite and language subdomains) redirect WWW to non-WWW?

Hi everyone,

I have two domains running on a Drupal 6 multisite configuration with Nginx (Perusio's config). The first domain, "example1.com", is just a single language, and I want to redirect all www.example1.com/* requests to example1.com/*. The second domain, example2.com, uses the i18n module to change the language and content based on the subdomain (i.e. en.example2.com -> English, es.example2.com -> Spanish). Here's the relevant lines in my nginx enabled site:

http://pastebin.com/Wx8HUrEB

Read more
splitsplitsplit's picture

Setting up Nginx Config: [emerg] no port in upstream

I'm trying to set-up Perusio's nginx configuration, I'm getting the following error on testing it:

nginx: [emerg] no port in upstream "www0" in /etc/nginx/php_fpm_status_vhost.conf:16
nginx: configuration file /etc/nginx/nginx.conf test failed

I couldn't see any other posts on it, so I was hoping someone could explain it to me. I presume it has something to do with PHP-FPM.

My config for PHP-FPM was lifted from Perusio's other config and left pretty much unedited. I'm using the TCP ports version.

I doubled checked the ports and I can see all three PHP-FPM pools.

Read more
superfedya's picture

SA-CORE-2013-003 and Nginx

SA-CORE-2013-003 - Drupal core - Multiple vulnerabilities add some changes in .htaccess that not used by Nginx.

https://drupal.org/SA-CORE-2013-003

And I got the admin warning notification:
Files directory Not fully protected
Temporary files directory Not fully protected

How to remove those messages? Do I need to add something in Nginx config?

Thanks

Read more
perusio's picture

Drupal SA on uncontrolled PHP execution

There's the Drupal core security advisory just released that talks about the uncontrolled PHP execution. here's some remarks.

  1. If you're using the config available on the Nginx wiki you're vulnerable.

    That config has a catch all location location ~ \.php$ {...} for handling
    PHP script execution.

  2. If you're using any of the configs recommended on the [Nginx group] (https://groups.drupal.org/nginx) you're safe.

Read more
Garrett Albright's picture

Battle ready Nginx

Here's a great article about performance-related Nginx configuration directives. I suggest you give it a read if performance is a concern for you. Not only does it tell you what directives and values to use, it also explains with an adequate level of depth what the directives actually mean and the effect they'll have on your site.

Read more
geocalleo's picture

Nginx, Mac OS X, Media Module Upload Troubles

Hi, I'm posting this because I'm at my wits end with trying to solve this one issue I'm having.

Read more
luxpir's picture

Clean URLs working fine, pager, overlay and other queries not

In D7 (upgraded from D6) I have managed to get clean URLs working with Nginx thanks to the various help and documentation available here and there online.

What doesn't work are queries of the ?page=1 or ?destination= type, for some reason.

The config is very similar to: http://docs.ngx.cc/en/latest/topics/apps/drupal.html, particulary the line:

  location @rewrite {
        rewrite ^/(.*)$ /index.php?q=$1;

and the few preceding lines.

Read more
amacias's picture

Perusio's config and multilingual sites

I have a multilingual site with three languages (English, Spanish and Catalan) and my set up is nginx (with Perurio's config, thanks a lot António for sharing it, it is a really good job) + Drupal 7 + Boost + APC.

My site is configured so all traffic is redirected to https, and my goal was to detect user's browser language and redirect him to the correct section (ie, https://www.mysite.com/es, https://www.mysite.com/ca or https://www.mysite.com).

Read more
Garrett Albright's picture

perusio's config and Drupal in a subdirectory

A bug was recently discovered in my module Pathologic that only materializes when Drupal is installed in a subdirectory under the web root - so in http://example.com/foo/ instead of just http://example.com/ . At various times since switching to Nginx, I've tried to figure out how to get perusio's config to play nice with Drupal installed this way so that I can test Pathologic with that sort of set-up, but can't recall ever having success. Has anyone else figured it out? Am I missing something simple?

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: