Skip to content

Commit 14c8f45

Browse files
author
António P. P. Almeida
committed
* Added specific Drupal headers ignore to fastcgi and proxy.
1 parent 724bf38 commit 14c8f45

10 files changed

+18
-13
lines changed

fastcgi.conf

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#-*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
1+
#-*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
22
### fastcgi configuration.
33
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
44
include fastcgi_params;
@@ -7,3 +7,7 @@ fastcgi_intercept_errors on;
77
## allow 4 hrs - pass timeout responsibility to upstrea
88
fastcgi_read_timeout 14400;
99
fastcgi_index index.php;
10+
## Hide the X-Drupal-Cache header provided by Pressflow.
11+
fastcgi_hide_header 'X-Drupal-Cache';
12+
## Hide the Drupal 7 header X-Generator.
13+
fastcgi_hide_header 'X-Generator';

fastcgi_params

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
1+
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
22
### fastcgi parameters.
33
fastcgi_param QUERY_STRING $query_string;
44
fastcgi_param REQUEST_METHOD $request_method;

mime.types

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-current-dictionary: american -*-
1+
# -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*-
22
types {
33
text/html html htm shtml;
44
text/css css;

nginx.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
1+
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
22
user www-data;
33
worker_processes 4;
44

php_fpm_status.conf

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-current-dictionary: american -*-
2-
1+
# -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*-
32
### The configuration for the status pages of php-fpm. As described in
43
### http://www.php.net/manual/en/install.fpm.configuration.php.
54

reverse_proxy.conf

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
2-
1+
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
32
### Configuration for reverse proxy. Passing the necessary headers to
43
### the backend. Nginx doesn't tunnel the connection, it opens a new
54
### one. Hence whe need to send these headers to the backend so that
65
### the client(s) IP is available to them. The host is also sent.
7-
86
proxy_set_header X-Real-IP $remote_addr;
97
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
108
proxy_set_header Host $http_host;
9+
## Hide the X-Drupal-Cache header provided by Pressflow.
10+
proxy_hide_header 'X-Drupal-Cache';
11+
## Hide the Drupal 7 header X-Generator.
12+
proxy_hide_header 'X-Generator';

sites-available/000-default

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*-mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
1+
# -*-mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
22
### Block all illegal host headers. Taken from a discussion on nginx
33
### forums. Cf. http://forum.nginx.org/read.php?2,3482,3518 following
44
### a suggestion by Maxim Dounin. Also suggested in

sites-available/example.com

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-current-dictionary: american -*-
1+
# -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*-
22
### Configuration for example.com.
33

44
## Rewrite server block.

upstream_phpapache.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
1+
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
22

33
### Upstream configuration for Apache functioning has a PHP handler.
44

upstream_phpcgi.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
1+
# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*-
22

33
### Upstream configuration for PHP FastCGI.
44

0 commit comments

Comments
 (0)