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.
Drupal 8 on Nginx
I've recently been trying to give Drupal 8 a serious look. I'm having a problem going through the install process, though, and I don't know if it's Drupal 8, Drupal 8 and Nginx, or just me. Have any other Nginx users been able to install D8 successfully recently?
Read moreSite was hit by meteorit
Today our site (local news) was hit by users that would like to know whats going on.
I have set up 2 years ago dedicated server with memcached turned on and it works great but today.
Provider of data-center told that we have reached about 80 megabit incoming traffic in peak today, proc had about 76% load.
Drupal works as nginx -> php-fpm. When server became slow, i could ssh in server, inspect processes, even worked apache on separate ip - phpmyadmin, and nginx result in 502 error on server.
Read moreMicrocache will offer a WSOD after a while
I'm serving cached version to all anonymous users. I'm kind of using it as a lazy man's varnish drop-in, it works great except it will offer a nice WSOD from time to time, and exclusively for the website.com front page.
I don't know why or when, but it looks like it depends on how busy the site is. The more anon users on the site, the faster the frontpage will wsod.
I've not found any errors in nginx or php logs, http response is 200.
Where in microcache configuration should I start looking?
I'm using Perusio's nginx config, nginx/1.2.5, pressflow6
fastcgi_microcache_zone.conf
Read moreClean URLs not working after migration to new LEMP server (other sites, clean URLs work fine)
I migrated via a mysqldump and a tarball a Drupal 7 site from one LAMP server to our LEMP server. I realized Clean URLs does not work, despite clean URLs working on another site (the vhost config is copied from said site). I have a very simple vhost config that calls 'include template;' which has all the good stuff in it, including the rewrite rules for Drupal 7.
I came across something on the nginx wiki (q.v. http://wiki.nginx.org/Drupal under "Notes") that says if you use Drupal in a subdirectory, it needs additional rewrites, and I tried the code, with no success.
Read moreperusio's config vs Lynx
Lynx is a command-line web browser which is often useful for testing things when you need something more functional than curl/wget but don't need a full-on graphical web browser (or perhaps when you want to read a web page without being distracted by pesky graphics, colors and text formatting). However, if you're using perusio's config on your server and you try to access it via lynx, it won't work; you'll get a "Alert! Unable to access document." error. Frustrating…
If you check the server logs, you'll see something like:
Read morewildcard setup for subdirectories
I am not sure if we'd pursue with multisite installation, but at the moment we have one site which supports multiple language like:
example.com/en
example.com/es
There seems to be a translation bug/error while using this setup, so, we are thinking about using it as subdomain (might be multisite) like:
en.example.com
es.example.com
But again, we'd also have some other feature not directly related with main site (only the user information) like:
blog.example.com
community.example.com
Nginx and boost with older config
hi folks,
A while back I altered perusio's config a bit for my server.
I'm running multiple domains - not all drupal.
I have to be honest I didn't follow the updates on github after I set up my config.
And this seems to come back and haunt me :)
Running tests... expected fails
We're using @perusio's drupal-with-nginx as our baseline configuration, and have an initiative to beef up our testing and test automation infra. Running tests from some or all of the test suite produces a healthy number of fails... many/most of which are to be expected, given the configuration.
Read moreSSL for only Authenticated users
I have been using Perusio's Nginx config in FreeBSD and Ubuntu without any problem. The only thing I couldn't understand is it redirects to HTTPS whenever I visit the site. I want to make my site accessible via plain HTTP for all users and HTTPS for registered/logged-in users.
I haven't changed any HTTPS config in FCGI or other place, I just declared the SSL certificates and keys, now whenever I visit the site, I am accessing HTTPS (even for anonymous users). I tried clearing all caches in my browser and also using private browsing but I am again forced to HTTPS. Im using D7, PHP-FPM, Nginx
Read moreVhost Generator
Hi all I just wanted to let you know that I created a vhost generation script for unbuntu 12.04 that creates a drupal oriented server{} block.
Get it/fork it/ect here. https://github.com/sanguis/vhostx
Having trouble getting image styles to work with nginx
Hi guys. I'm getting my first nginx server up and running and am running into one issue. I know this question has been asked a thousand times, but I just can't get Drupal image styles to work. Following is my conf file, which I've pieced together the best I can using various advice from the interwebs. Any tips would be greatly appreciated!
Read moreConfiguring Nginx
Hi,
I am planning to install Nginx on a HostGator dedicated server. The problem is they (HostGator) do not support it but can install it and then its up for me to configure it. However, I have no experience configuring Nginx yet. Do you have a sample or a de-facto nginx config for Drupal 6?
Here is my setup:
Installed and configured APC
MySQL running fine
Drupal 6 running on a sub-directory (
/home/myusername/www/siteA.com/
/home/myusername/www/siteB.com/
/home/myusername/www/staging.siteA.com/
/home/myusername/www/staging.siteB.com/
)
Microcaching with SSL session caching
Hi,
we are developing a e-commerce site using D7, Commerce module, PHP-FPM, APC, MySQL, InnoDB, Memcached, Nginx, SSL. Our Dedicated server has Intel i5 2.5GHz 4 Cores, FreeBSD, 16 GB RAM, 120 GB SSD.
Simultaneously run D6 and D7 using perusio's drupal-with-nginx
Hi. I just bumped into this hurdle... a glaring oversight in my planning effort. We need to temporarily run a v6 site and a v7 site on the same web server, if possible. Currently, the machine is serving up a d6 (pressflow) site and we're using @perusio's drupal-with-nginx project.
The nginx.conf file contains version-specific include directives, and so wondering if it's workable to move these to the relevant vhost for the 6 and 7 sites, respectively?
Read moreNoob Question Re Perusio et al Nginx Conf File
I have just finished installing nginx on my 512 linode and when I ran the IP in my chrome, I can see that nginx installed successfully. (yahoo, says this beginner!). Now working on nginx.conf The instructions from vpsbible.com tell me to strip out the content of the current nginx.conf and insert the following instead. Should I use, instead, the content of the nginx.conf file at perusio's github (or one of the other three)?
Read moreI gave up on Lighty.
Well, after years of waiting for version 1.5 to come out, I finally decided to give up recently when upgrading between sub-point-releases of 1.4 on my VPS caused my site to go down (again) and I couldn't quickly figure out why. Yep, even though I founded the Lighty GDO group, I'm running nothing but Nginx now, both on my VPS and locally. Here's a few quick thoughts on the switching experience.
Read moreSubdirectory domain rewrite rule
Hi, I'm banging my head with something which should be relatively simple to do.
My scenario is the following:
- 3 sites sharing the same codebase on /var/www/mysite
- each site has it's own database
- The root URLs need to be mysite.com, mysite2.com and mysite2.com/fr
- All three share the same file system on /var/www/mysite/default/files/
- perusio nginx configuration
/var/www/mysite/sites/sites.php:
$sites['mysite.com'] = 'default';
$sites['mysite2.com'] = 'mysite2.com';
$sites['mysite2.com.fr'] = 'mysite2.com.fr';
mysite.com:
Read moreDrupal 7 images problem
Okay, the problem is simple: images generated by drupal 7's image system in nodes won't show up and i'm getting pissed because it won't work, even with all the info here...
Setup:
Nginx(80)--->apache(8080)(php backend)
Image part in the vhost:
location @rewrite {
proxy_pass http://mydomain.tld:8080/index.php?q=$uri;
}
## Drupal 7 generated image handling, i.e., imagecache in core. See:
## https://drupal.org/node/371374.
location ~* /files/styles/ {
access_log off;
expires 30d;
try_files $uri @rewrite;
}
I've activated SSL on Nginx and Clean URLs are gone
I've been Google'ing a solution for hours, but I still haven't found.
Do you have any ideas?
Read moreI have got BOM characters in nginx webserver
if I use apache, website running well, but if I switch to nginx webserver, I have got BOM character. Log massage like this:
Type php
Severity warning
Message
Warning: Cannot modify header information - headers already sent by (output started at /home/zumi/xxx.com/includes/common.inc:2613) in drupal_send_headers() (line 1243 of /home/zumi/xxx.com/includes/bootstrap.inc).
.................
need help, I want nginx