IIS 错误:无法在<fastCGI>应用程序配置中找到<handler> scriptProcessor

 

FastCGI <fastCgi>
OverviewCompatibilitySetupHow ToConfigurationSample Code
Overview

The <fastCgi> element contains a collection of <application> elements, each of which creates a FastCGI application pool definition. Internet Information Services (IIS) 7 includes the FastCGI component. This component gives you greater reliability and better performance and lets you run the PHP application framework and other Web application frameworks on IIS 7.

The simplest FastCGI application pool definition requires that you include the fullPath attribute in an <application> element to define the binaries to use for the specific application framework. For the PHP framework, set the fullPath attribute to the directory and file name of the PHP binaries.

Other attributes are optional and let you configure a number of other parameters. These include the maximum number of requests that a FastCGI worker process can process before it is recycled, the maximum number of worker processes for an application pool, and the maximum amount of time a FastCGI request can take.

Note: In order to process requests by using FastCGI, you must first map the path and the specific file name extensions to the FastCGI module and specify the target FastCGI process as the script processor.

NEW IN IIS 7.5

IIS 7.5 added the following attributes to the <fastCgi>/<application> element:

The monitorChangesTo attribute lets you specify a file to monitor for changes that might affect the behavior of a FastCGI application. For example, if you use the PHP framework, you can configure IIS to monitor the PHP.INI file for changes by specifying the full path to the file in the monitorChangesTo attribute.
The stderrMode attribute specifies how IIS 7 will handle errors that are returned from a FastCGI application through the STDERR stream.
The signalBeforeTerminateSeconds attribute lets you configure IIS to wait for a specified period of time after IIS signals a FastCGI application that it needs to shut down. This lets a FastCGI application clean up any settings before IIS terminates the process.
Compatibility

Version    Notes
IIS 8.5    The <fastCgi> element was not modified in IIS 8.5.
IIS 8.0    The <fastCgi> element was not modified in IIS 8.0.
IIS 7.5    The <application> element of the <fastCgi> collection was updated in IIS 7.5 with the monitorChangesTo, stderrMode, and signalBeforeTerminateSeconds attributes.
IIS 7.0    The <fastCgi> element was introduced in IIS 7.0.
IIS 6.0    N/A
Setup

To use the FastCGI environment, you must first install the CGI role service. The installation process registers the Common Gateway Interface (CGI) role service in both the <globalModules> and <modules> elements. You do not need to perform any other steps to install the FastCGI environment.

WINDOWS SERVER 2012 OR WINDOWS SERVER 2012 R2

On the taskbar, click Server Manager.
In Server Manager, click the Manage menu, and then click Add Roles and Features.
In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.
On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Application Development, and then select CGI. Click Next.
.
On the Select Features page, click Next.
On the Confirm installation selections page, click Install.
On the Results page, click Close.
WINDOWS 8 OR WINDOWS 8.1

On the Start screen, move the pointer all the way to the lower left corner, right-click the Start button, and then click Control Panel.
In Control Panel, click Programs and Features, and then click Turn Windows features on or off.
Expand Internet Information Services, expand World Wide Web Services, expand Application Development Features, and then select CGI.

Click OK.
Click Close.
WINDOWS SERVER 2008 OR WINDOWS SERVER 2008 R2

On the taskbar, click Start, point to Administrative Tools, and then click Server Manager.
In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).
In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.
On the Select Role Services page of the Add Role Services Wizard, select CGI, and then click Next. 

On the Confirm Installation Selections page, click Install.
On the Results page, click Close.
WINDOWS VISTA OR WINDOWS 7

On the taskbar, click Start, and then click Control Panel.
In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.
Expand Internet Information Services, then select CGI, and then click OK. 

How To

Note for IIS 7.0 users: Some of the steps in this section may require that you install the Microsoft Administration Pack for IIS 7.0, which includes a user interface for FastCGI settings. To install the Microsoft Administration Pack for IIS 7.0, see the following URL:

http://www.iis.net/expand/AdministrationPack
HOW TO CREATE A GLOBAL FASTCGI HANDLER MAPPING FOR PHP

Note: Before the following procedure will work, you must have already installed binaries that will execute the file path or file name extension that you specify. This example uses a PHP implementation available from www.php.net.

Open Internet Information Services (IIS) Manager:
If you are using Windows Server 2012 or Windows Server 2012 R2:
On the taskbar, click Server Manager, click Tools, and then click Internet Information Services (IIS) Manager.
If you are using Windows 8 or Windows 8.1:
Hold down the Windows key, press the letter X, and then click Control Panel.
Click Administrative Tools, and then double-click Internet Information Services (IIS) Manager.
If you are using Windows Server 2008 or Windows Server 2008 R2:
On the taskbar, click Start, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.
If you are using Windows Vista or Windows 7:
On the taskbar, click Start, and then click Control Panel.
Double-click Administrative Tools, and then double-click Internet Information Services (IIS) Manager.
In the Connections pane, click the server name for which you want to configure FastCGI handler mappings.
In the Home pane, double-click Handler Mappings. 

In the Actions pane, click Add Module Mapping... 

Enter the following information:
Enter the file name extension in the Request path text box. For example, "*.php".
Click FastCgiModule in the Module drop-down list.
Enter the path to the scripting engine in the Executable box. For example, "C:\PHP\php-cgi.exe".
Enter a unique name for the handler mapping in the Name box. For example, "PHP-FastCGI".


Click Request Restrictions...
Select Invoke handler only if request is mapped to.
Click to select the File or Folder option.
Click OK. 

Click OK.
If you are prompted to create a FastCGI application in the Add Module Mapping dialog box, click Yes. 
Note: This will automatically create a FastCGI application for the handler mapping that you just created. If you choose No, you can manually create a FastCGI application later.

 

http://www.iis.net/configreference/system.webserver/fastcgi

转载于:https://www.cnblogs.com/maizhongfei/p/5153909.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在IIS部署Django项目,您需要执行以下步骤: 1. 安装IIS:如果您还没有安装IIS,请先安装它。可以使用“控制面板”的“程序和功能”来安装IIS。 2. 安装Python:确保您的服务器上安装了Python。 3. 安装wfastcgi:使用以下命令安装wfastcgi: ``` pip install wfastcgi ``` 4. 创建Django项目:创建并配置Django项目。确保您的项目能够在本地运行。 5. 创建Web应用程序:在IIS创建Web应用程序。使用“管理工具”打开IIS管理器,右键单击“网站”并选择“添加网站”。为网站提供名称、物理路径和端口号。 6. 安装FastCGI:在IIS安装FastCGI。使用“服务器管理器”打开IIS管理器,选择“服务器管理器”窗口的“角色”,然后选择“添加角色服务”。选择“Web服务器(IIS)”和“应用程序服务器”。 7. 配置FastCGI:在IIS配置FastCGI。打开IIS管理器,右键单击Web应用程序并选择“添加应用程序”。为应用程序提供别名和物理路径。在“处理程序映射”添加一个新的FastCGI映射。选择“FastCGI”处理程序类型,并提供可执行文件的路径(例如,C:\ Python27 \ python.exe)。在“Request Restrictions”,确保“Invoke handler only if request is mapped to:File”选项被选。 8. 配置wfastcgi:在IIS配置wfastcgi。打开IIS管理器,右键单击Web应用程序并选择“配置”,然后选择“添加模块映射”。在“请求路径”输入“*”,在“模块”输入“FastCgiModule”,在“可执行文件”输入“C:\ Python27 \ Scripts \ wfastcgi.py”。在“请求限制”,选择“所有Verbs”,并确保“Invoke handler only if request is mapped to:File”选项被选。 9. 测试:测试您的Django应用程序是否能够在IIS运行。 这些步骤可能因不同的操作系统版本和IIS版本而有所不同。如果您遇到任何问题,请查看文档或咨询网络管理员。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值