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.

rahim123's picture

Perusio with Drupal multisite

Hi,

I've been using Perusio's config for Drupal 6 with Nginx successfully for a few months on a single site. Now, I want to transfer another Drupal 6 site to this same server using Drupal multisite. I used to use Drupal 6 multisite with Apache and I thought I had a pretty good idea of how it works. But now I'm stuck.

Let's call my first site current working correctly on Drupal 6 "example1.com". Here's the config:
http://pastebin.com/3bKxyFft

Read more
krisp1's picture

The page isn't redirecting properly - firefox error

Hi all,

I am relatively new to nginx and to configuring my own VPS but until recently I had my site running with no issues at all. Despite searching far and wide I am unable to find a solution to this error. Nginx is displaying default welcome page on my IP address ok but I get the above error when attempting to load my domain name. My domain name was displaying a test page ok until I dowloaded Drupal into the same directory. I have Ubuntu 12.04 on my server and I am connecting to php with fpm via a unix socket, although I am also getting a fail when reloading php-fpm.

Thanks

Read more
gkom's picture

[Solved] Blank screen when logging in with admin rights

Hello,

I'm in the process of moving my D7 site to nginx but I have run into the following problem.

When I log in using an account with some administrative privileges I get a blank screen. When I login as a normal authenticated user everything works fine.

Does anybody have any idea what might be causing this?

This is my config:

nginx.conf

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;

Read more
moltra's picture

converting from apache 2 with mod_fcgid to Nginx on Ubuntu VPS

I am currently running my site on a Ubuntu 12.04 LTS with apache 2, memcache, APC and varnish. I am still using alot of resources with little or no activity on my site. I am thinking about migrating to Nginx. Anyone out there have any experience moving from apache 2 to nginx?

Read more
huytp's picture

Nginx error when enable APC cache

Hello,

I'm getting this error when enable APC cache. Anyone can help me resolve this issue?

Read more
ariapn's picture

New nginx convert. Please comment on my config

I just migrated our drupal site to nginx from apache.

I based my config on perusio's setup using drupal_boost.conf.
We have a main site and then a couple subsites using drupal multisite configuration. I think I configure it correctly. But please let me know if I did anything wrong or any improvement I can make. The complete conf file is here http://pastebin.com/y22PV59f

I'm not sure about this part:

location / {
# This is cool because no php is touched for static content
try_files $uri @cache;
}

    location /sub1 {
Read more
rahim123's picture

How to run another PHP app in subfolder or subdomain with Perusio's config?

Hi everyone,

I just started using XCache, which comes with an HTTP admin interface. I can't figure out how to make this work with Nginx+PHP-FPM and Drupal6+Boost with the Perusio config. I tried setting it up in a subdomain, but it just keeps redirecting it to my Drupal site running on the TLD. I don't really care if it's a subdomain or subfolder, but I'd really appreciate a quick tip on how to make it work.

Thanks a lot!

Read more
naeluh's picture

Drupal 8 and Nginx File not found on every page but front

I am trying to install Drupal 8 which I did successfully I am just having a bit of trouble. I a virtual host and in a sub directory I installed d8 but I can only access the front every other page gives me a 404 ?

here is my server config for that directory -

server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6

    root /var/www/toughcom.com/public_html;
    index index.php index.html index.htm;

    if (!-e $request_filename) {
Read more
mesch's picture

Configuring Multiple php-fpm worker pools

I've been looking into how to best isolate virtual hosts from one another when using nginx with php-fpm (like using suEXEC with Apache). The most common approach I've found is to use a separate php-fpm pool configured for each virtual host, as described here:
http://www.howtoforge.com/php-fpm-nginx-security-in-shared-hosting-envir...

With this approach, is there a way to control the maximum number of children across all pools?

Also, does anyone have an entirely different approach?

Read more
rahim123's picture

Boost + Nginx not working consistently

Hi everyone,

I'm using Perusio's Drupal 6 + Boost on Nginx config. I can't seem to get Boost to reliably serve up pages. I have confirmed that the cache directory in the Drupal root is world writable, and files are being created in it. However, I can't seem to get browsers to retrieve a cached version of the page. I open the page in a browser as an anonymous user, then I refresh the page, and then view source, and there are no Boost tags at the bottom. The strange thing is that when I retrieve the page with wget and view the source, it does have the Boost tag at the bottom. I have tried with 3 different browsers, including a pristine config with no cookies or anything, and it still makes no difference. Any idea what could be wrong?

Thanks!

Read more
giorgio79's picture

Which php handling method do you recommend for best performance?

Helllo,

The installation steps mention 3 php modes https://github.com/perusio/drupal-with-nginx#installation
upstream
fastcgi
php fpm

Which one do you recommend? I have not found any benchmarks comparing them. I am using Boost, so nginx will serve lots of static files.

Read more
rahim123's picture

BOA 2.0.9 (Nginx + PHP-FPM + Pressflow) - Slow loading of nodes

Hi everyone,

Read more
delvalle's picture

Error 503 (Google Webmaster Tools)

Hi, I've the sitemap with XML Sitemap module. I can access the sitemap perfectly visiting www.mydomain.com/sitemap.xml but when I submit it to Google Webmaster Tools I get a "Error HTTP: 503" ("No se puede acceder a la red: No se puede acceder a la red", that could be translated to "network can't be accessed" or something like that).

Read more
superfedya's picture

Nginx and ETag/If-None-Match

Hi,

Somebody know if ETag/If-None-Match headers works with Nginx?

With Apache I can add this code:

RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]

But how I can do that with Nginx?

Thanks

Read more
gapa's picture

Is it possible to use perusio configuration with ISPConfig?

Is it possible to use perusio configuration with http://www.ispconfig.org/? And also if it is possible to use this configuration along other cms systems? I would like to host simple, small sites. Drupal 6 and 7 and magento shop.

Read more
superfedya's picture

Need some help with Nginx rewrite (redirect)

Hi,

I need to do 301 redirect all user registration path to custom url.
Like;
/user/register and /user/register*

to

/forum/ucp.php?mode=register

I don't understand Nginx rewrite system very well, so maybe somebody can help me?

Thanks for the great support!

Read more
Torenware's picture

Redirecting IE9 compatibly with nginx when behind a load balancer

I'm having a nightmarish problem getting IE 9 to redirect from http to https. I've looked at a discussion from about a year ago (http://groups.drupal.org/node/206813), but in that case, nginx is in complete control.

In my case, I'm in AWS, and https is actually getting handled by an elastic load balancer (ELB), which is proxying over to nginx over port 80, and setting http_x_forwarded_proto:

<

pre>
#x_forwarded_proto stuff for elb/https issues - see http://daniel.hahler.de/handle-x-forwarded-proto-in-backend-nginx
set $my_https "off";

Read more
fehin's picture

Clean url issue with drupal in root and drupal in subdirectory setup

My current setup is mysite.com and mysite.com/dev.
I have been able to get clean url to work with mysite.com/dev but not with mysite.com. I tried several setup examples that I found online but they either didn't work or broke one or both sites.

I would like to get clean url to work on both sites.

Here is my config


server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default_server ipv6only=on; ## listen for ipv6

server_name mysite.com www.mysite.com;
root /srv/www/mysite.com/public_html;
Read more
orkutmuratyilmaz's picture

What should we do with Linux/Cdorked.A malware?

I've seen this post today:

http://www.welivesecurity.com/2013/05/07/linuxcdorked-malware-lighttpd-a...

It looks like something went terrible.

What should we do with our servers and Drupal installations?

Read more
flocondetoile's picture

Nginx native caching and memcached

Hello,

I use Nginx and his native caching system (Perusio's configuration) to quickly serve web pages to anonymous visitors.

I wonder if it makes sense to use memcached, along with the nginx cache system ? Or rather, instead of the Nginx cache ?

The only advantage I can see is to store the cached pages in RAM rather than on the HDD.

Have you ever used memcached with / along nginx caching system ? And for what use cases ?

thanks

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: