From 47ca9472c1b0e3d1b8306c677f4f45da374618ae Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tim.dijen@minbzk.nl>
Date: Thu, 20 Feb 2020 10:10:56 +0100
Subject: [PATCH] Update Nginx config

---
 docs/simplesamlphp-install.md | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/docs/simplesamlphp-install.md b/docs/simplesamlphp-install.md
index 4f3292a03..4af9b6216 100644
--- a/docs/simplesamlphp-install.md
+++ b/docs/simplesamlphp-install.md
@@ -27,7 +27,7 @@ Prerequisites
 -------------
 
  * A web server capable of executing PHP scripts.
- * PHP version >= 5.6.0.
+ * PHP version >= 7.1.0.
  * Support for the following PHP extensions:
    * Always required: `date`, `dom`, `hash`, `libxml`, `openssl`, `pcre`, `SPL`, `zlib`, `json`, `mbstring`
    * When automatically checking for latest versions, and used by some modules: `cURL`
@@ -211,8 +211,12 @@ look like this:
             location ~ ^(?<prefix>/simplesaml)(?<phpfile>.+?\.php)(?<pathinfo>/.*)?$ {
                 include          fastcgi_params;
                 fastcgi_pass     $fastcgi_pass;
-                fastcgi_param    SCRIPT_FILENAME $document_root$fastcgi_script_name;
-                fastcgi_param    SCRIPT_NAME /simplesaml$phpfile;
+                fastcgi_param SCRIPT_FILENAME $document_root$phpfile;
+
+                # Must be prepended with the baseurlpath
+                fastcgi_param SCRIPT_NAME /simplesaml$phpfile;
+
+                fastcgi_param PATH_INFO $pathinfo if_not_empty;
             }
         }
     }
-- 
GitLab