You are correct if your nginx configuration (outside the location directive) does not have the index directive, then the location directive will never match, and the fastcgi_index directive fastcgi_index useless.
If you have such a line in your configuration
index index.php
then the request to / will create an internal redirect to /index.php , it will correspond to location and fastcgi. For php-fpm, you will need the SCRIPT_FILENAME parameter, which indicates the executable. Typically, the configuration looks something like this:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
$fastcgi_script_name contains the name of the associated script, so fastcgi_index ignored.
There is at least one instance where fastcgi_index is useful and used: when nginx and php-fpm are on different servers, and nginx cannot match index.php .
source share