在Windows Server 2016上安装了python 3.8.1,django 3.0.3,wfastcgi和iam收到此错误,找不到任何修复它的东西。
在python安装文件夹上给了IIS AppPool\DefaultAppPool读取和使用权限,但它仍然不起作用,不知何故处理程序无法读取它,但据我所知,配置似乎是正确的。希望你能帮助我。谢谢。
C:\inetpub\wwwroot -> web.conf
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Python FastCGI"
path="*"
verb="*"
modules="FastCgiModule"
scriptProcessor="c:\users\administrator\python38\python.exe|c:\users\administrator\python38\lib\site-packages\wfastcgi.py"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<!-- Required settings -->
<add key="WSGI_HANDLER" value="web.wsgi.application" />
<add key="PYTHONPATH" value="C:\inetpub\wwwroot\AddressLizenzbuch" />
<!-- Optional settings -->
<add key="DJANGO_SETTINGS_MODULE" value="web.settings" />
</appSettings>
</configuration>
C:\inetpub\wwwroot\AddressLizenzbuch\web\blog\static -> web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!-- Overrides the FastCGI handler to let IIS serve the static files -->
<handlers>
<clear/>
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
</handlers>
</system.webServer>
</configuration>
manage.py
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
精慕HU
相关分类