在IIS上配置FastCGI托管PHP代码有许多高级设置,在也有一些设置可调整,在Windows iis中,FastCGI设置是放在 applicationHost.config 配置文件中,我在这个文件中为PHP应用程序增加了以下FastCGI设置:

 

 

<fastCgi>
<application fullPath="{approot}\php\php-cgi.exe" maxInstances="4" instanceMaxRequests="10000" requestTimeout="180" activityTimeout="180">
<environmentVariables>
<environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000" />
</environmentVariables>
</application>
</fastCgi>

 

注意修改fullPath为自己的路径