IIS Express applicationhost.config 設置(一)

與站點都有的web.config文件相比,applicationhost.config的system.webServer標籤設置全部站點。並且基本都是設置,而不是加載。php

0.fastCgi標籤

這個標籤設置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

相關文章
相關標籤/搜索