IIS Express applicationhost.config 设置(一)

原创
2016/04/30 11:37
阅读数 4.4K

与站点都有的web.config文件相比,applicationhost.config的system.webServer标签设置所有站点。而且基本都是设置,而不是加载。

0.fastCgi标签

这个标签设置fastCgi,不过设置不代表启用。以下配置了PHP7的例子:

<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是有效时间内最大的请求数量。

下面的environmentVariables是环境变量,这样在运行IIS Express是自动加入程序的临时环境变量中,避免系统的环境变量太杂。



展开阅读全文
加载中

作者的其它热门文章

打赏
1
0 收藏
分享
打赏
0 评论
0 收藏
1
分享
返回顶部
顶部