Whats the recommended setting of these php parameters for nginx server
cgi.fix_pathinfo = 1
cgi.force_redirect = 0

Here I use cgi.fix_pathinfo=0 to enable PATH_INFO
and cgi.force_redirect=1 for security reasons that I dont understand:

You can turn force_redirect off. This setting has no effect on nginx
when using the php as a fastcgi instance. here is more information
It is designed to prevent someone from calling your CGI binary
directly from a url like

where that would execute PHP directly. Instead this option makes teh
cgi binary require a redirect on the server side.