【发布时间】:2018-07-24 20:45:50
【问题描述】:
我在将我的 Py 项目部署到 Azure 上时遇到了一些问题。 我得到的信息是 “由于发生内部服务器错误,无法显示页面。”
我知道这是项目中的配置错误。 我的 web.config 文件有以下内容。
Python 安装在我的天蓝色 Web 服务中的 D 中和我本地计算机的 C 中 运行 Py2.7
应用名称是白板
本地主机上的端口 5965...
我做错了什么?? MS 文档没有帮助
<configuration>
<appSettings>
<add key="WSGI_HANDLER" value="whiteboard.app"/>
<add key="PYTHONPATH" value="D:\home\site\wwwroot"/>
<add key="WSGI_LOG" value="D:\home\LogFiles\wfastcgi.log"/>
</appSettings>
<system.webServer>
<handlers>
<add name="PythonHandler" path="*" verb="*" modules="FastCgiModule" scriptProcessor=" D:\home\Python27\python.exe|D:\home\Python27\wfastcgi.py"
resourceType="Unspecified" requireAccess="Script"/>
</handlers>
<httpPlatform processPath="C:\Python27\python.exe"
arguments="F:\FYP-Whiteboard\Whiteboard\whiteboard\runserver.py %HTTP_PLATFORM_PORT%5"
stdoutLogEnabled="true"
stdoutLogFile="F:\FYP-Whiteboard\Whiteboard\whiteboard\LogFiles\python.log"
startupTimeLimit="60"
processesPerApplication="16">
<environmentVariables>
<environmentVariable name="SERVER_PORT" value="5965" />
<environmentVariable name="PYTHONPATH" value="D:\home\site\wwwroot" />
<environmentVariable name="PORT" value="%HTTP_PLATFORM_PORT%" />
</environmentVariables>
</httpPlatform>
</system.webServer>
</configuration>
【问题讨论】:
标签: python azure deployment