Sun Java System Web Server 7.0 Update 3 管理員指南

外掛程式函數 (SAF)

FastCGI 外掛程式提供了下列伺服器應用程式函數 (SAF):

以下小節說明 FastCGI SAF 的各種參數和「error-reason」字串:

auth-fastcgi

auth-fastcgi 是一個 PatchCheck 函數。此函數用於將請求轉寄至「Authorizer」FastCGI 應用程式。如果授權成功,將傳送回覆碼 200。否則,會將來自「Authorizer」FastCGI 應用程式的回應傳送回使用者代理程式。

您可以在 http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S6 找到有關 FastCGI 角色的更多資訊。

auth-fastcgi SAF 可接受的參數位於: FastCGI SAF 參數

以下 obj.conf 程式碼範例說明 auth-fastcgi 的用法:

PathCheck fn="auth-fastcgi" app-path="/usr/bin/perl" app-args="/fastcgi/apps/auth/SimpleAuth.pl" bind-path="localhost:3432"

responder-fastcgi

responder-fastcgi 是一個 Service 函數。此函數用於將請求轉寄至做為「Responder」的 FastCGI 應用程式。來自 Responder 應用程式的回應將傳送回使用者代理程式。可以在 http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S6 找到有關 FastCGI 角色的更多資訊。

responder-fastcgi SAF 可接受的參數清單位於: FastCGI SAF 參數

以下 obj.conf 程式碼範例說明 responder-fastcgi 的用法:

Service fn="responder-fastcgi" app-path="/fastcgi-enabled-php-installation/bin/php" bind-path="localhost:3433" app-env="PHP_FCGI_CHILDREN=8" app-env="PHP_FCGI_MAX_REQUEST=500"

filter-fastcgi

filter-fastcgi 是一個 Service 函數。此函數用於將請求轉寄至「Filter」類型的 FastCGI 應用程式。「Filter」應用程式可接收與 HTTP 請求關聯的資訊,還可以接收儲存在伺服器上的檔案中資料。然後,「Filter」應用程式產生「已篩選」版本的資料流做為回應。此回應將被傳送回使用者代理程式。可以在 http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S6 找到有關 FastCGI 角色的更多資訊。

filter-fastcgi SAF 可接受的參數清單位於: FastCGI SAF 參數

以下 obj.conf 程式碼範例說明 filter-fastcgi 的用法:

Service fn="filter-fastcgi" app-path="/fastcgi/apps/filter/SimpleFilter" bind-path="localhost:3434" app-env="LD_LIBRARY_PATH=/fastcgi/fcgi-2.4/libfcgi/.libs" min-procs=2

error-fastcgi

error-fastcgi 是 Error 函數。error-fastcgi SAF 可處理 FastCGI 外掛程式特有的錯誤。但是,此函數並不處理 HTTP 錯誤。可將 FastCGI 外掛程式配置為發生錯誤時顯示特定頁面,或將請求重新導向至特定 URL。

error-fastcgi SAF 可接受的參數清單位於: FastCGI SAF 參數

以下 obj.conf 程式碼片段示範 error-fastcgi 的用法:

Error fn="error-fastcgi" error-reason="Invalid Parameters" error-url="http://www.foo.com/errorPage.html"

請參閱FastCGI SAF 參數,以取得有關 error-fastcgi 參數的資訊。

FastCGI SAF 參數

除非另有明確說明,否則 FastCGI 外掛程式 SAF「auth-fastcgi」、「responder-fastcgi」和「filter-fastcgi」均可接受下列參數:

請注意,chrootusergroupnice chdirrlimit_asrlimit_corerlimit_nofile 等參數僅適用於 UNIX 平台。這些參數在 Windows 平台上會被忽略。

error-fastcgi 伺服器應用程式功能 (SAF) 接受下列參數:

error-fastcgi SAF 錯誤原因字串

本節提供所有有效「error-reason」字串的清單及這些字串的說明: