diff --git a/.docker/web-nginx/Dockerfile b/.docker/web-nginx/Dockerfile index 7b1af4e84..012f476f0 100644 --- a/.docker/web-nginx/Dockerfile +++ b/.docker/web-nginx/Dockerfile @@ -8,6 +8,7 @@ COPY .docker/web-nginx/nginx.conf /etc/nginx/templates/nginx.conf.template # By default, nginx will send the php requests to "app" server, but this server # name can be overridden at runtime by passing an APP_UPSTREAM env var ENV APP_UPSTREAM=${APP_UPSTREAM:-app} +ENV APP_FASTCGI_PASS="${APP_FASTCGI_PASS:-\$backend}" # Webroot (defaults to /var/www/html) ENV APP_WEB_ROOT=${APP_WEB_ROOT:-/var/www/html} diff --git a/.docker/web-nginx/nginx.conf b/.docker/web-nginx/nginx.conf index 94511eeb9..9dbf5d1b1 100644 --- a/.docker/web-nginx/nginx.conf +++ b/.docker/web-nginx/nginx.conf @@ -47,7 +47,7 @@ http { set $backend "${APP_UPSTREAM}:9000"; - fastcgi_pass $backend; + fastcgi_pass ${APP_FASTCGI_PASS}; } # Allow PATH_INFO for PHP files in plugins.local directories with an /api/ sub directory to allow plugins to leverage when desired @@ -68,9 +68,9 @@ http { set $backend "${APP_UPSTREAM}:9000"; - fastcgi_pass $backend; + fastcgi_pass ${APP_FASTCGI_PASS}; } - + location / { try_files $uri $uri/ =404; }