Public bug reported:

Coming from trusty in our production environments for running modern
LEMP stacks we just noticed that on xenial the nginx-common package
(1.10.0-0ubuntu0.16.04.2) is missing a fastcgi parameter that was
available before on trusty. The missing parameter in
/etc/nginx/fastcgi_params is "fastcgi_param  SCRIPT_FILENAME
$document_root$fastcgi_script_name;". Without it FPM won't work, as it
doesn't get the location of the PHP file.

That means that an integration with FPM in Nginx will break when doing a
dist-upgrade in case you got a recommended config like this:

location ~ \.php$ {
    try_files $uri $uri/ =404;
    include /etc/nginx/fastcgi_params;
    fastcgi_index index.php;
    fastcgi_pass 127.0.0.1:9000;
}

On the other side there is another new config file
/etc/nginx/fastcgi.conf which includes the missing option.

diff -Nru /etc/nginx/fastcgi.conf /etc/nginx/fastcgi_params
--- /etc/nginx/fastcgi.conf     2016-04-26 16:51:14.000000000 +0200
+++ /etc/nginx/fastcgi_params   2016-04-26 16:51:14.000000000 +0200
@@ -1,5 +1,4 @@

-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;

So far i don't have a clue why there is now a new file that keeps the
old behavior, while the same file changes the behavior. So that's a
clear regression to me that breaks the PHP integration in Ubuntu 16.04
:)

** Affects: nginx (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

- Coming from trusty in our production environments for running a modern
+ Coming from trusty in our production environments for running modern
  LEMP stacks we just noticed that on xenial the nginx-common package
  (1.10.0-0ubuntu0.16.04.2) is missing a fastcgi parameter that was
  available before on trusty. The missing parameter in
  /etc/nginx/fastcgi_params is "fastcgi_param  SCRIPT_FILENAME
  $document_root$fastcgi_script_name;". Without it FPM won't work, as it
  doesn't get the location of the PHP file.
  
  That means that an integration with FPM in Nginx will break when doing a
  dist-upgrade in case you got a recommended config like this:
  
  location ~ \.php$ {
-     try_files $uri $uri/ =404;
-     include /etc/nginx/fastcgi_params;
-     fastcgi_index index.php;
-     fastcgi_pass 127.0.0.1:9000;
+     try_files $uri $uri/ =404;
+     include /etc/nginx/fastcgi_params;
+     fastcgi_index index.php;
+     fastcgi_pass 127.0.0.1:9000;
  }
  
  On the other side there is another new config file
  /etc/nginx/fastcgi.conf which includes the missing option.
  
- diff -Nru /etc/nginx/fastcgi.conf /etc/nginx/fastcgi_params 
+ diff -Nru /etc/nginx/fastcgi.conf /etc/nginx/fastcgi_params
  --- /etc/nginx/fastcgi.conf   2016-04-26 16:51:14.000000000 +0200
  +++ /etc/nginx/fastcgi_params 2016-04-26 16:51:14.000000000 +0200
  @@ -1,5 +1,4 @@
-  
+ 
  -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  QUERY_STRING       $query_string;
+  fastcgi_param  REQUEST_METHOD     $request_method;
+  fastcgi_param  CONTENT_TYPE       $content_type;
  
- 
- So far i don't have a clue why there is now a new file that keeps the old 
behaviour, while the same file changes the behaviour. So that's a clear 
regression to me that breaks the PHP integration in Ubuntu 16.04 :)
+ So far i don't have a clue why there is now a new file that keeps the
+ old behavior, while the same file changes the behavior. So that's a
+ clear regression to me that breaks the PHP integration in Ubuntu 16.04
+ :)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1602756

Title:
  Missing fastcgi parameter in /etc/nginx/fastcgi_params on xenial

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1602756/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to