Sid*_*tha 5 django fastcgi iis-8 django-deployment windows2012rc
我正在尝试使用IIS在Windows 2012服务器上部署Django应用程序.我的web.config文件:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Django Handler" path="*" verb="*" modules="FastCgiModule" scriptProcessor="C:\Users\chinmay_arima\env_resolution\Scripts\python.exe|C:\Users\chinmay_arima\env_resolution\Lib\site-packages\wfastcgi.py" resourceType="Unspecified" requireAccess="Script" />
</handlers>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
获取"HTTP错误500 - 内部服务器错误".请找到附件以查看错误.使用Django版本:2和IIS版本:8.5我按照以下链接:http: //blog.mattwoodward.com/2016/07/running-django-application-on-windows.html 请帮帮我,我需要使用IIS服务器在Windows上部署Django应用程序.
我认为这个错误是由于你的web.config文件放错位置引起的。另外,下面似乎缺少一些参数appSettings
您的配置文件应类似于https://github.com/Johnnyboycurtis/webproject/blob/master/web-config-template
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Python FastCGI"
path="*"
verb="*"
modules="FastCgiModule"
scriptProcessor="<to be filled in>"
resourceType="Unspecified"
requireAccess="Script" />
</handlers>
</system.webServer>
<appSettings>
<add key="PYTHONPATH" value="C:\inetpub\wwwroot\webproject" />
<add key="WSGI_HANDLER" value="webproject.wsgi.application" />
<add key="DJANGO_SETTINGS_MODULE" value="webproject.settings" />
</appSettings>
</configuration>
Run Code Online (Sandbox Code Playgroud)
以下是与该代码项目一起使用的教程:使用 Microsoft IIS 在 Windows 上部署 Django
| 归档时间: |
|
| 查看次数: |
124 次 |
| 最近记录: |