Nginx的,如何设置fastcgi_index为几个值?

我在Linux上使用nginx webserver作为域“example.com”。 我通过fastcgi将所有内容转发到fastcgi-mono-server4。

现在,一切正常,我只想设置几个索引页面,例如:

fastcgi_index Default.aspx default.aspx index.html index.htm; 

但不知何故,它不接受多个值。 我怎样才能做到这一点 ? 有没有可能? 我也尝试逗号和分号作为分隔符,但没有任何作品…

这里的虚拟主机条目在“站点可用”中的位置条目:

  location / { root /home/webpages/www/example.com; index index.html index.htm default.aspx Default.aspx; fastcgi_index Default.aspx; fastcgi_pass 127.0.0.1:9000; include /etc/nginx/fastcgi_params; } 

单声道可能不会以接受多个值的方式实现它。 然而。 你完全不需要这个,因为Nginx可以很好地处理它。

这下面的代码将testing一个目录,如果它存在,它将应用索引值,如果不是,它将redirect到@default这将fastcgi_pass。

 server { root /home/webpages/www/example.com; index index.html index.htm default.aspx Default.aspx; include /etc/nginx/fastcgi_params; location / { try_files $uri/ @default; fastcgi_pass upstream; // Don't think this is required, but just in case. } location @default { fastcgi_pass upstream; } }