@@ -61,37 +61,54 @@ The following variables are available to configure the role:
6161 (cf. http://wiki.nginx.org/HttpFlvStreamModule ), defaults to false.
6262- ** nginx_drupal_mp4_streaming** : Whether or not to use MP4 streaming, (cf.
6363 http://nginx.org/en/docs/http/ngx_http_mp4_module.html ) defaults to false.
64- - ** nginx_drupal_http_pre_includes** : A list of file to include in the ``` http ```
65- context (in ``` nginx.conf ``` ), before any other directives.
66- - ** nginx_drupal_http_post_includes** : A list of file to include in the ``` http ```
67- context (in ``` nginx.conf ``` ), after any other directives except the enabled
64+ - ** nginx_drupal_http_pre_includes** : A list of file to include in the
65+ ``` http ``` context (in ``` nginx.conf ``` ), before any other directives.
66+ - ** nginx_drupal_http_post_includes** : A list of file to include in the
67+ ``` http ``` context (in ``` nginx.conf ``` ), after any other directives except
68+ the enabled
6869 site configuration files.
69- - ** nginx_drupal_upstream_servers** : The list of PHP upstream servers, each item
70- is a server address (and parameters, see
70+ - ** nginx_drupal_upstream_servers** : The list of PHP upstream servers, each
71+ item is a server address (and parameters, see
7172 http://nginx.org/en/docs/http/ngx_http_upstream_module.html#server ), defaults
7273 to ``` ["unix:/var/run/php-fpm.sock", "php-fpm-zwei.sock"] ``` .
7374- ** nginx_drupal_upstream_backup_servers** : The list of PHP upstream backup
7475 servers, defaults to ``` ["unix:/var/run/php-fpm-bkp.sock"] ``` .
76+ - ** nginx_drupal_language_path_prefixes** : (optional) The list of enabled
77+ language path prefixes used on the site.
78+ - ** nginx_drupal_x_frame_options** : (optional) Value of the X-Frame-Options
79+ response header, defaults to ` DENY ` . If the site uses frames, set to
80+ ` SAMEORIGIN ` . ` DENY ` may conflicts with pseudo streaming (at least with Nginx
81+ version 1.0.12)
7582- ** nginx_drupal_sites** : The list of available sites.
7683 Each site uses the following structure:
7784 - ** file_name** : The name of the site configuration file.
7885 - ** http** : HTTP server configuration (leave empty to disable HTTP)
7986 - ** port** : The port to listen on
8087 - ** https** : HTTPS server configuration (leave empty to disable HTTPS)
81- - ** port** : The port to listen on
82- - ** certificate** : Path to the SSL certificate of the server (in the PEM
83- format).
88+ - ** port** : The port to listen on.
89+ - ** certificate** : Path to the SSL certificate of the server (in the
90+ PEM format).
8491 - ** certificate_key** : Path to the SSL secret key of the server (in the
8592 PEM format).
8693 - ** server_name** : The (primary) server name.
8794 - ** ipv6** : (optional) IPv6 address of the server
88- - ** alternate_server_name** : (optional) Alternate server name, configured as
89- redirect to the primary server site. This can be used to remove the
95+ - ** alternate_server_name** : (optional) Alternate server name, configured
96+ as redirect to the primary server site. This can be used to remove the
9097 ``` www. ``` prefix.
9198 - ** root** : Path to the root directory for the site.
9299 - ** limit_conn** : (optional) The limit_conn for the site (defaults to
93100 ``` arbeit 32 ``` ).
94101 - ** enabled** : Whether or not the site should be enabled (defaults to true).
102+ - ** rewrites** : (optional) A list of rewrites directives, using the
103+ following structure:
104+ - ** regex** : The regular expression used to match the URI.
105+ - ** replacement** : The replacement pattern used for the rewrite.
106+ - ** flags** : (optional) The flag parameter for the rewrite.
107+ - ** includes** : (optional) A list of additional Nginx configuration files
108+ to include for the site.
109+ - ** server_name_in_redirect** : (optional) Enables or disables the use of
110+ the primary server name, specified by the server_name directive, in
111+ redirects issued by nginx.
95112
96113
97114Examples
@@ -125,8 +142,8 @@ HTTPS but disabled.
125142 certificate: /etc/nginx/ssl/bar.cert
126143 certificate_key: /etc/nginx/ssl/bar.key
127144
128- Nginx as a Reverse Proxy for a single Drupal 6 sites, without microcaching and
129- with image hot linking protection.
145+ Nginx as a Reverse Proxy for a single Drupal 6 sites, without microcaching,
146+ with image hot linking protection and a rewrite directive .
130147
131148
132149 - hosts: all
@@ -144,6 +161,10 @@ with image hot linking protection.
144161 root: /var/www/foo
145162 http:
146163 port: 80
164+ rewrites:
165+ - regex: '^/foo-bar.htm$'
166+ replacement: '/foo/bar'
167+ flags: 'permanent'
147168
148169License
149170-------
0 commit comments