简体   繁体   English

Django Web应用已成功部署在Azure App Service Linux上,但只能看到Azure默认页面

[英]Django Web app is successfully deployed on Azure App Service Linux but can only see Azure Default Page

I recently published my Django local git repo to the Azure App Service with Python 3.7 runtime. 我最近将我的Django本地git存储库发布到具有Python 3.7运行时的Azure应用服务。 The deployment said it is successful and active but I only see Azure Default Page when I browse it. 部署表示它是成功且活动的,但浏览时只会看到Azure默认页面。

I can't find any logs anywhere and it shows no signs of errors. 我在任何地方都找不到日志,也没有错误迹象。 How can I solve this ? 我该如何解决?

UPDATE: My Azure Configuration settings does not have option for setting the default page setting. 更新:我的Azure配置设置没有用于设置默认页面设置的选项。 The web app I am deploying is for Django and not for ASP 我正在部署的Web应用程序适用于Django,而不适用于ASP

Thanks and regards, Rachhek. 谢谢,拉赫克。

Ok. 好。 I will answer the question here. 我将在这里回答问题。 Check the deafult document section of the Web App. 检查Web应用程序的默认文档部分。

Make sure you default page is listed in here and is above hostingstart.html 确保您的默认页面在此处列出,并且位于hostingstart.html上方

https://i.imgur.com/FKzFULD.png

I am answering my own question. 我在回答我自己的问题。 I solved the problem by fixing the gunicorn bind settings. 我通过修复gunicorn绑定设置解决了这个问题。 My guess is by default it pointed to wsgi in some other directory. 我的猜测是默认情况下它在其他目录中指向wsgi。

I added the following startup command to the general settings of the Web App Configuration 我在Web App配置的常规设置中添加了以下启动命令

gunicorn -w 2 -b 0.0.0.0:8000 --chdir /home/site/wwwroot/appname appname.wsgi:application 

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM