【发布时间】:2021-01-18 04:36:01
【问题描述】:
我的 Django 应用程序部署遇到问题。我遵循了几个教程(最后一个:https://www.youtube.com/watch?v=APCQ15YqqQ0)来帮助我部署我的应用程序,我不明白为什么我的处理程序不起作用。这是我的 web.config 文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Python FastCGI"
path="*"
verb="*"
modules="FastCgiModule"
scriptProcessor="c:\users\xxx\documents\github\app_folder\scripts\python.exe|c:\users\xxx\documents\github\app_folder\lib\site-packages\wfastcgi.py"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<add key="PYTHONPATH" value="C:\Users\xxx\Documents\GitHub\app_folder\app" />
<add key="WSGI_HANDLER" value="app_name.wsgi.application" />
<add key="DJANGO_SETTINGS_MODULE" value="app_name.settings" />
</appSettings>
</configuration>
由于我的 virtualenv 在 app_folder 文件夹中,app 文件夹包含 Django 项目。
我有这条消息要输出:
Additional information about the error :
Module FastCgiModule
Notification ExecuteRequestHandler
Handler django_handler_test
Error code 0x8007010b
URL requested http://localhost:94/
Physical Path C:\Users\xxx\Documents\GitHub\app_folder\app
Session opening Method Anonyme
User Session Anonyme
我将类别名称翻译成法语
即使这可能不是一个好的做法,我也打算先在 Windows 计算机上部署它,然后再在服务器(Windows 或 Linux)上进行完整部署。现在,我真的需要在 Windows 环境中完成我的测试。感谢您的帮助和理解。
【问题讨论】:
-
您的问题解决了吗?如果您的问题得到解决,那么我请求您将有用的建议标记为答案。这将帮助面临同样问题的其他人。如果您的问题仍然存在,请尝试参考社区成员提供的解决方案。如果您还有其他问题,请告诉我们。我们将尝试提供进一步的建议来解决该问题。感谢您的理解。
-
我没有收到答案通知...我一回家就测试!
标签: python django iis handler wfastcgi