forked from perusio/drupal-with-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Major refactoring of the config. Upstream fallbacks. Nginx status
and more.
- Loading branch information
António P. P. Almeida
committed
Oct 23, 2011
1 parent
30a80a0
commit b1b67e0
Showing
15 changed files
with
238 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- mode: nginx; mode:autopair; mode: flyspell-prog; ispell-local-dictionary: "american" -*- | ||
### Configuration file for specifying which hosts can invoke Drupal's | ||
### cron. This only applies if you're not using drush to run cron. | ||
|
||
geo $not_allowed_cron { | ||
default 1; | ||
## Add your set of hosts. | ||
127.0.0.1 0; # allow the localhost | ||
192.168.1.0/24 0; # (V)LAN hosts allowed | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*- | ||
|
||
### Configuration of nginx stub status page. Here we define the | ||
### allowed hosts using the Geo Module. http://wiki.nginx.org/HttpGeoModule | ||
|
||
geo $dont_show_nginx_status { | ||
default 1; | ||
127.0.0.1 0; # allow on the loopback | ||
192.168.1.0/24 0; # allow on an internal network | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*- | ||
|
||
### The configuration for Nginx status page. As described in | ||
### http://wiki.nginx.org/HttpStubStatusModule. | ||
|
||
### php-fpm provides a status and a heartbeat page that is served through the web server. | ||
### Here's an example configuration for them. | ||
|
||
## Get the nginx status. | ||
location /nginx_status { | ||
if ($dont_show_nginx_status) { | ||
return 404; | ||
} | ||
stub_status on; | ||
access_log off; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*- | ||
|
||
### Upstream configuration for PHP FastCGI. | ||
|
||
## Add as many servers as needed: | ||
## Cf. http://wiki.nginx.org/HttpUpstreamModule. | ||
## Note that this configuration assumes by default that keepalive | ||
## upstream connections are supported and that you have a Nginx | ||
## version with the fair load balancer. | ||
|
||
upstream phpcgi { | ||
## If your version of Nginx doesn't have the fair load balancer: | ||
## https://github.com/gnosek/nginx-upstream-fair comment out the | ||
## following line. | ||
fair; | ||
server 127.0.0.1:9001; | ||
server 127.0.0.1:9002; | ||
## Create a backend connection cache. Note that this requires | ||
## Nginx version greater or equal to 1.1.4. | ||
## Cf. http://nginx.org/en/CHANGES. Comment out the following | ||
## line if that's not the case. | ||
keepalive 5; | ||
} | ||
|
||
## Add a third pool as a fallback. | ||
upstream phpcgi_backup { | ||
server 127.0.0.1:9003; | ||
## Create a backend connection cache. Note that this requires | ||
## Nginx version greater or equal to 1.1.4. | ||
## Cf. http://nginx.org/en/CHANGES. Comment out the | ||
## following line if that's not the case. | ||
keepalive 1; | ||
} |
Oops, something went wrong.