Skip to content

Commit 8e8f35e

Browse files
author
Pierre Buyle
committed
Include the reverse_proxy.conf file when using the (Apache) proxy PHP handling mode.
1 parent ce9214e commit 8e8f35e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

templates/nginx.j2

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,10 @@ http {
170170
## Block MIME type sniffing on IE.
171171
add_header X-Content-Options nosniff;
172172

173-
## Include upstream PHP handling server
173+
{% if nginx_drupal_php_handling == 'proxy' %}
174+
## Include the upstream servers for PHP FastCGI handling config.
174175
include upstream_php.conf;
176+
{% else %}
175177

176178
## Include the map to block HTTP methods.
177179
include map_block_http_methods.conf;
@@ -190,6 +192,13 @@ http {
190192
## and adds the server variable $http_x_forwarded_proto
191193
#include map_https_forwarded_proto.conf;
192194

195+
## Include the upstream servers for Apache handling the PHP
196+
## processes. In this case Nginx functions as a reverse proxy.
197+
{% if nginx_drupal_php_handling == 'proxy' %}
198+
include reverse_proxy.conf;
199+
include upstream_php.conf;
200+
{% else %}
201+
193202
## Include the php-fpm status allowed hosts configuration block.
194203
## Uncomment to enable if you're running php-fpm.
195204
#include php_fpm_status_allowed_hosts.conf;

0 commit comments

Comments
 (0)