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.
nginx: The page you are looking for is temporarily unavailable
I am using nginx, with php-fm. I am using webform module. when I try to add components to a webform nginx redirects to this page:
The page you are looking for is temporarily unavailable.
Please try again later.
nginx error log:
Read moreMySQL Backups truncated..
Hi,
I seem to be having an odd issue that I have only just noticed when trying to restore some data.. Fortunately I had an alternative backup..
Before doing what I was doing I took a backup using backup_migrate and the download method to save the backup on my PC.. After doing what I needed the site broke.. I tried to restore and it failed.. I looked into the backup file and noticed that it was incomplete.. It hadn't backed up all the tables..
When backing up to the server (Manual Backup Directory) it works fine.. I don't remember this being an issue before switching to nginx..
Read moreHigh Ram usage
Hi I just switched from apache to nginx so I'm quite new to it. I am running ubuntu 10.04 with 1GB ram I've installed APC & Boost. Currently I'm getting high ram usage and I don't know what's causing it.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
578 www-data 20 0 180m 69m 40m S 0 6.9 0:04.31 php-fpm
577 www-data 20 0 165m 57m 43m S 0 5.7 0:04.93 php-fpm
579 www-data 20 0 166m 54m 40m S 0 5.5 0:03.74 php-fpm
581 www-data 20 0 159m 50m 42m S 5 5.1 0:04.24 php-fpm
Always redirecting to https?
Hi all,
After more than 2 days trying to figure what can be the reason, this is like a desperate call of help.
First, thanks to perusio for the great work. I was using my own setup based on the distro files, but with your approach I've learned a lot.
I'm using nginx 1.0.13 + drupal6 + APC, migrated from an Apache configuration. It's a dedicated server where I host 4 different websites, only one has a SSL certificate and is where I have problems.
Read moreNginx map issue?
Hi all,
I'm trying out an nginx + boost + pressflow 6 setup using perusio's config. So far it's working well (thanks for all the great work!), but I'm having a couple issues:
1) The home page appears to be always cached by boost, even for logged in users.
2) Submitting a form is causing nginx to return a 405 error. Googling around, I learned that nginx won't post to a static file, so it appears that somehow my configuration is letting POST's go to the boost cached files, rather than to index.php.
If I add the following to the location @cache then it fixes the second problem:
Read morewhat is the fastest, stable vps configuration?
hello. i have two linode accounts. the larger one will have aegir/barrucuda/octopus on it when i get it to working again. the Linode 512 vps account will have a detroit community site in drupal, it will be a large site with lots of features. i am using ubuntu 10.4, because i like the word ubuntu.
Read moreHybrid mobile detection
I have a site that I'm using Responsive Design for screens with a width higher than 1023px, with some adjustments for screens up to 1440w.
For screen widths lesser than 1024, I want to serve a mobile version of the site at m.mydomain.com
I know it's not possible to detect screen width server-side, so I've been wondering if a hybrid approach would work:
1. "Select" all mobile browser user agents on nginx.
2. Redirect them to m.mysite.com/screendetect
3. The HTML on this page would have a <META HTTP-EQUIV="Refresh" CONTENT="6; URL=http://m.mysite.com/">
Securepages Nginx and Drupal 6 and a Double-Slash
Ok thanks to all the great people here I've finally got our site moved over to nginx and it operates so much better (largely using perusio's configs -- thanks!). We currently have one problem, however, and that is we get a double-slash when securepages moves us to a https page (i.e. checkout) which causes some problems and securepages doesn't appear to take us back to http later - in fact the radio button to enable/disable it is greyed out.
I've read - http://groups.drupal.org/node/206813
and http://drupal.org/node/347682
New English language nginx documentation
In case you don't follow the mailing list, they announced a new English translation of the Russian documentation at:
It may not be completely up to date right now, but it will be the official nginx documentation in English.
Read morePet peeve or why I think that Nginx should not ape Varnish in Drupal
Hello,
I'm not too happy with the concept of purging a cache item a la Varnish that the purge 3rd party module promotes. Here are some reasons:
-
Nginx is not Varnish, the cache item is a file. So it's quite simple to deal with it.
-
In Nginx if you bypass the cache the cache get's refreshed, i.e., the response is fetch from upstream, so that instead of purging and
waiting for a new request to create a new cache item we should instead bypass the cache when we want to update an item and thus do
both the purging and the updating in a single request.
Cache warmer or microcaching as a viable caching strategy for Drupal
I've just released a drush command that implements a crawler to keep the cache warm. Although it was developed with microcaching in mind you can use it for keeping any type of external cache warm. Varnish, or whatever type of caching proxy you decide to use.
-
To keep a cache warm just set a cron job of the command invocation that suits a particular site traffic patterns.
-
To prime a cache fire the command once with the proper options to get all the desired content in cache.
Nginx static file cache or Varnish in front?
I have used varnish quite a bit on my LAMP stacks and this deff helps quite a bit out for static files to serve up and keeps the load off of apache.
I hear good things about nginx static file caching so is their a need to put varnish up a head of it?
Read moreDrupal7 nginx ssl
Hi
I'm trying to get a drupal7 site setup on nginx with everything served via https, with http doing a global rewrite e.g.
server {
server_name mysite.fqdn;
listen :80;
rewrite ^/(.)$ https://mysite.fqdn/1ドル permanent;
}
How you you manage your web users, groups and file system permissions??
Hi,
I am interested in a discussion on how you construct your users, groups and file system permissions to try and establish a best practice.. I know there are a few ways people suggest doing this..
Option 1
Webserver and PHP run as www-data..
User account and user group own files..
www-data user is a member of the user group..
Group permissions determine what's writeable by the webserver.. Files remain owned by the user and user group.. Files uploaded through the website are owned by www-data that can cause some issues..
Option 2
Webserver and PHP run as www-data..
Ubuntu 10.04 LTS based stack
Look at the pretty stack diagram!
https://github.com/VisualFox/s66c-Stack
Include instruction for virtualbox and Linode.
This stack use Monit to monitor services.
Can be run in development mode or production mode.
Seem to work fine with Ubuntu 11.10 (need more testing).
Have some extra recipes for installing node.js, beanstalk, redis, mongodb.
Feel free to contribute and/or fork!
In complement I also developed some scripts to manage this stack:
https://github.com/VisualFox/s66c
Read moreConfused LEMP vs LAMP same vps hardware LEMP is slower?
My Nginx setup, granted very basic start to it, no real caching set up yet... LAMP has really no special additions to it kinda a out of the box install.
Drupal sets ups are clones on both systems.
command for testing on both ab -c10 -n1000 http://localhost/
nginx result
Server Software: nginx/1.0.9
Server Hostname: localhost
Server Port: 80
Document Path: /
Document Length: 3255 bytes
Concurrency Level: 10
Time taken for tests: 78.190 seconds
Complete requests: 1000
Failed requests: 0
My first Nginx + php-fpm + percona stab at getting it set up on ubuntu 10.04
I wanted to start this thread to give anyone wanting to quickly get up and running to play around with nginx and such.. below is my first stab at sorta a howto, I used some info from other sites and next step is getting all the drupal things working like I want clean urls, imagecache, upload progress.
Note, this setup is very new to me coming from LAMP so please if you use these instructions use them only for testing out this setup.
Edited: Jan 25, 2012
My Current DB Choice, Percona
Read moreNginx compile options with upload progress and others?
Im going to be building Nginx from source but I wanted to know what additional modules/addons I need to be aware of when compiling this to get it to work with drupal..
currently I have seen that and use the upload progress system..
anything else?
also anyone care to share their configure line and potential /etc/nginx settings?
cheers
Read moreNginx Newbie here.. any good script installer for linode?
Hi, Im finally thinking of taking the plunge and getting rid of my LAMP stack in favor for nginx.. I was wondering if anyone had a decent install script for ubuntu 10.04 64 bit, I have a linode instance up and running.. If not is their a decent walk though to get nginx, pressflow, varnish, memcache, apc and all the other bells up and running ?
Sorry if this was asked here before might be worth a sticky if their is such a walk though or script.
Read moreContent found at /comment issue
I'm using Perusio's excellent nginx configs and I'm running into an issue. It seems that a comment's title link goes to site.com/comment/comment_id As an example, I've set a test up at http://testing.caulderon.com/ If you click on the node you'll see the link for the comment goes to http://testing.caulderon.com/comment/1#comment-1 I've got a client who's content is showing up in google using the comment url and that sucks for SEO. I've edited robots.txt to block the comment path, but I want a true fix for this. Can someone help?
Thanks!
Read more