fastcgi_index可以在nginx的virtual.conf文件中有两个值吗?

我想知道你是否可以在nginx虚拟configuration文件中有多个'fastcgi_index'…如果你在下面查看我的virtual.conf,你会看到我把home.php放在'index.php'旁边。我的home.php更多或更less我的网站index.php。 我的网站运行正常(如果它运行得更好,我不会看到是否可以做任何调整)与index.php作为'fastcgi_index',但我甚至不知道为什么index.php(除了这很可能是“fastcgi_index”的默认设置),因为我的网站使用home.php而不是index.php。 所以我的问题是…如果我将我当前的'fastcgi_index'(index.php)replace为home.php,我的网站会运行得更好。 或者我可以把这两个'fastcgi_index'如下所述?

location ~ \.php$ { root /home/xx/usr/share/nginx/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php **home.php;** fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; include fastcgi.conf; 

不, fastcgi_index只能取一个文件名。 这是因为nginx没有search指定的文件名,只是将它提供给URL的string追加到URL中,如果以斜线结尾,则将其传递给FastCGI服务。 FastCGIpath不必作为文件系统上的文件存在,所以nginx无法validation它们的存在。