与站点都有的web.config文件相比,applicationhost.config的system.webServer标签设置全部站点。并且基本都是设置,而不是加载。php
这个标签设置fastCgi,不过设置不表明启用。如下配置了PHP7的例子:web
<system.webServer> <fastCgi> <application fullPath="D:\PHP-7.0.4\php-cgi.exe" monitorChangesTo="php.ini" activityTimeout="1000" requestTimeout="1000" instanceMaxRequests="10000"> <environmentVariables> <environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="10000"/> <environmentVariable name="PHPRC" value="D:\PHP-7.0.4"/> </environmentVariables> </application> </fastCgi> </system.webServer>
fastCgi标签下application设置一个fastCgi,fullPath是全路径;monitorChangeTo是配置文件,熟悉PHP的都知道这个php.ini;activityTimeout是有效时间毫秒为单位;requestTimeout是响应时间单位毫秒;instanceMaxRequests是有效时间内最大的请求数量。app
下面的environmentVariables是环境变量,这样在运行IIS Express是自动加入程序的临时环境变量中,避免系统的环境变量太杂。
spa