【问题标题】:Django - IIS deployment - scriptProcessor could not be foundDjango - IIS 部署 - 找不到 scriptProcessor
【发布时间】:2021-08-03 05:08:56
【问题描述】:

我一直在尝试使用 IIS 部署 django 应用程序,但在执行完所有步骤后,我遇到了错误

<handler> scriptProcessor could not be found in <fastCGI> application configuration

我知道这个错误是由于 scriptprocessor 值的路径不正确,但提到的值是正确的。请看下面的截图

wfastcgi-enable 的屏幕截图

Applied configuration changes to section "system.webServer/fastCgi" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"
""c:\program files\python39\python.exe"|"c:\program files\python39\lib\site-packages\wfastcgi.py"" can now be used as a FastCGI script processor

以下是 wwwroot 文件夹中 web.config 文件中设置的值

<handlers>
  <add name="Python FastCGI" 
  path="*" 
  verb="*" 
  modules="FastCgiModule" 
  scriptProcessor="c:\program files\python39\python.exe|c:\program files\python39\lib\site-packages\wfastcgi.py"
  resourceType="Unspecified" 
  requireAccess="Script" />
</handlers>

有人可以帮助我为什么会遇到这个错误。

【问题讨论】:

标签: django iis wfastcgi iis-handlers


【解决方案1】:

终于解决了问题!

问题在于 scriptProcessor 键的值。 scriptProcessor 的路径有空间,这就是问题错误被抛出。

我终于不得不重新安装python,路径之间没有空格,如下所示,它工作正常。

scriptProcessor="c:\python39\python.exe|c:\python39\lib\site- 
packages\wfastcgi.py"

【讨论】:

    猜你喜欢
    • 2021-10-07
    • 1970-01-01
    • 2012-10-09
    • 2021-09-27
    • 1970-01-01
    • 2019-12-24
    • 2019-11-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多