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.
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.
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!
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";
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 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?
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
Google Pagespeed module for nginx
A couple weeks ago a Google Pagespeed module for nginx was released as beta. It has some interesting filters that process things like css files, js files, images, html and headers. See https://developers.google.com/speed/docs/mod_pagespeed/filters
I added it to a test version of my Ubuntu 12.04 nginx package on Launchpad. You can install it with
add-apt-repository ppa:brianmercer/testing
aptitude update
aptitude install nginx-pagespeedthen create a directory for it (I'll do this in the package eventually)
mkdir /var/cache/nginx/pagespeed
Read more Just started with Nginx but stuck in redirect loops
hey,
just about to move from lighttpd to nginx. but for some reason i can't manage to get it to work. i used perusio config from github but always end up in redirect loops. i got the feeling that i need to learn a bit more about this config and tried a fresh drupal setup with a very minimal nginx conifg out perusio version. but even then i only manage to get redirect loops between / and install.php
can anyone help me to get a minimal working nginx.config for a fresh drupal setup without any fancy stuff?
my nginx.conf:
user nginx nginx;
worker_processes 1;
Latest D7 security update changes to htaccess. How to implement in nginx configuration
The 7.22 security update for D7 includes some interesting and challenging modifications to the standard drupal distributions .htaccess file.
Read moreServer keeps going down with 502 Bad Gateway error
Hi,
We recently moved to DigitalOcean and used nginx. My colleague who set it up left the company just right after we launch the site and so we are at a lost on how to solve this problem.
Here are the server logs, if it may help. There are also several config files, which one do I need to display here?
I hope you can help us,thank you in advance.
tail -f /var/log/php5-fpm.log
[22-Apr-2013 08:00:33] NOTICE: [pool www] child 4923 started
[22-Apr-2013 08:23:25] NOTICE: [pool www] child 1569 exited with code 0 after 10287.032182 seconds from start
nginx config for multiple drupal installations
I have been looking/trying this but couldn't find perfect solutions. I was testing multiple Drupal installations and my configs is like
server {
server_name localhost;
listen 80;
root /var/www/mainsite;
}I have main site which has a link to forum and I have forum site in
/var/www/forum; The main site and forum site has their own settings.php and files. It is just separate project but linked with each other, as the forum has link to main site via home button.
how do I acheive this with Nginx, I tried
server {
server_name localhost;
conflicting server name ignored
While restarting Nginx I get the warning mentioned below. I don't have other servers running just one domain with ssl, and I have defined server name after every server block. I'm using 99% Perusio's config, 1% mine server name and some values.
Read moreconflicting server name "example.com" on 0.0.0.0:80, ignored
While restarting Nginx I get the warning mentioned below. I don't have other servers running just one domain with ssl, and I have defined server name after every server block. I'm using 99% Perusio's config, 1% mine server name and some values.
Read moreHas anyone been able to get their Drupal with Nginx to work with image style after 7.20 upgrade?
I have tried several tips and none worked. I also used the recommended fix $conf['image_allow_insecure_derivatives'] = TRUE;, it didn't work. I tried the module version of it http://drupal.org/project/image_allow_insecure_derivatives, still not working.
File Upload Size Limits
I've migrated an OpenAtrium site from Apache to an NGINX server using spawn-fcgi.
I've set my max_uploads and max_post size in php.ini, and made adjustments to the user permissions as far as upload file sizes.
I've tested this issue using the same site and database with Apache, and don't have any upload issues.
Here is the error I get:
The selected file 8mbfile.txt could not be uploaded. The file is 8 MB which would exceed your disk quota of 9 MB.As you can see, my file upload size set in my php.ini is 9MB.
Read moreWhich PHP files of core and modules must be accessible from browser?
First of all, excuse my English. I hope you can understand what I want to ask.
For a long time I have used this NginX config as a template for mine own, but I am very unsatisfied with it's security concerning PHP files. I mean, there are only some PHP files which a really needed for Drupal to work: index.php, update.php and cron.php (install.php used only once and I don't use any features of xmlrpc.php). So I want to rewrite my NginX config to grant access only for enlisted PHP files.
Read moreclean URLs on nginx
Hi.
I posted a nginx question with some configs in the drupal.org post-installation forum. Would anybody have a few minutes to review the config I posted and tell me if they see anything blatently wrong? I simply cannot get clean URLs to work. The config I'm adapting is the boost one, and to note may be that the last commit to that repo was over 3 years ago so maybe there's something new?
Drupal and nginx upload module
I've been looking at using the upload module with drupal but I have not found any module that uses it, I've found modules that support upload_progress (FileFieldNginx), but when using it the upload is still processed directly by PHP.
Is there a module around that I'm not aware of?
If it does not exist, is that because it makes no sense or because nobody worked on it?
Read moreUsing variables in access_log, error_log
Hi,
I am using nginx 1.1.19. I am using the following configuration for my site.
I don't want to repeat the site name in access_log, error_log, php_log like this
access_log /var/log/nginx/example.com.access.log;
error_log /var/log/nginx/example.com.error.log debug;
fastcgi_param PHP_VALUE "error_log=/var/log/php/example.com.error.log";I am trying this config. But i end up having file names like in my log folder.
$host.error.log.
I know i'm doing something wrong. Could any one of u help me ?
server{
listen 80;
Nginx/FastCGI vs Apache/mod_php: What's faster?
chx shared an interesting article via his Twitter feed today; some speed comparisons of Apache with the mod_php extension (which embeds the PHP interpreter into Apache for faster but less-secure execution) versus Nginx and PHP via FastCGI.
Read more



