Added the SCRIPT_FILENAME, PATH_INFO, and PATH_TRANSLATED parameter.

Robin Richtsfeld robin.richtsfeld at gmail.com
Sat Sep 18 17:19:24 UTC 2021


# HG changeset patch
# User Robin Richtsfeld <robin.richtsfeld at gmail.com>
# Date 1631984576 -7200
#      Sat Sep 18 19:02:56 2021 +0200
# Node ID 16927168a7b5712422021887f4a788e93d850159
# Parent  97cf8284fd19b30169231e43831e7787baba72f2
Added the SCRIPT_FILENAME, PATH_INFO, and PATH_TRANSLATED parameter.

For reference see the official PHP FastCGI Example:
https://www.nginx.com/resources/wiki/start/topics/examples/phpfcgi/

*diff -r 97cf8284fd19 -r 16927168a7b5 conf/fastcgi.conf*
--- a/conf/fastcgi.conf Fri Sep 10 12:59:22 2021 +0300
+++ b/conf/fastcgi.conf Sat Sep 18 19:02:56 2021 +0200
@@ -6,6 +6,8 @@
 fastcgi_param  CONTENT_LENGTH     $content_length;

 fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
+fastcgi_param  PATH_INFO          $fastcgi_path_info;
+fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;
 fastcgi_param  REQUEST_URI        $request_uri;
 fastcgi_param  DOCUMENT_URI       $document_uri;
 fastcgi_param  DOCUMENT_ROOT      $document_root;
*diff -r 97cf8284fd19 -r 16927168a7b5 conf/fastcgi_params*
--- a/conf/fastcgi_params       Fri Sep 10 12:59:22 2021 +0300
+++ b/conf/fastcgi_params       Sat Sep 18 19:02:56 2021 +0200
@@ -1,10 +1,13 @@

+fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
 fastcgi_param  QUERY_STRING       $query_string;
 fastcgi_param  REQUEST_METHOD     $request_method;
 fastcgi_param  CONTENT_TYPE       $content_type;
 fastcgi_param  CONTENT_LENGTH     $content_length;

 fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
+fastcgi_param  PATH_INFO          $fastcgi_path_info;
+fastcgi_param  PATH_TRANSLATED    $document_root$fastcgi_path_info;
 fastcgi_param  REQUEST_URI        $request_uri;
 fastcgi_param  DOCUMENT_URI       $document_uri;
 fastcgi_param  DOCUMENT_ROOT      $document_root;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20210918/f95bcf8f/attachment.htm>


More information about the nginx-devel mailing list