Flask网站无法正确部署,但可以在http://localhost:8000上正常运行 [英] Flask website not deploying correctly but working perfectly on http://localhost:8000

查看:562
本文介绍了Flask网站无法正确部署,但可以在http://localhost:8000上正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我正在尝试部署一个网站,该网站具有我在崇高中所做的烧瓶后端(python 3.6)和小型数据库(sqlite3).

它可以在本地完美运行

So I am trying to deploy a website which has a flask backend (python 3.6) and a small database (sqlite3) that I did in sublime.

It works perfectly locally 

但是,当我将其部署到"Azure Web App"时,选项,它只会将我发送到一个破碎的页面,上面写着 您无权查看此目录或页面."

我不知道这是否与事实有关我正在使用数据库和烧瓶.我之所以这样说,是因为我部署了两个只是HTML,CSS的网站

我使用了以下视频:

使用VSTS(快速入门)构建并部署到Azure Web应用

任何帮助将不胜感激 :(

However, when I deploy it to the "Azure Web App" option, it just sends me to a broken page which says " You do not have permission to view this directory or page."

I do not know if it has to do with the fact that I am using a database and flask. I say this because I deployed two websites that were just HTML, CSS and javascript perfectly.

I used the following video:

Build and deploy to an Azure Web App using VSTS (Quick Starts)

Any help would be highly appreciated :(

推荐答案

您可以在App Service刀片中启用诊断并解决问题" 选项,这将使您快速评估您的 WebApp.

You could enable "Diagnose and solve problems" option in the App Service blade, this will give you a quick assessment on your WebApp.

您可以查看文档 (尤其是 详细错误日志 启用日志并对其进行分析,以获取有关应用程序问题的更多详细信息.

You may checkout the documentation Enable diagnostics logging for web apps in Azure App Service (Especially the Detailed Error Logs)for enabling the logs and analyze them to fetch more details on the issue with your app.

您可以使用 Kudu控制台 ( https://yoursite.scm.azurewebsites.net )来管理文件- 它为您提供了命令行和文件浏览器对站点的访问权限. 您可以通过KUDU控制台查看所有WebApp文件.从Kudu控制台>调试控制台>> (CMD/PowerShell>站点> wwwroot. >>其中包含您的所有文件.

You could use Kudu console (https://yoursite.scm.azurewebsites.net) to manage the files- it gives you both command line and file browser access to your site. You could review all your WebApp files though KUDU console. From the Kudu Console> Debug Console >> (CMD/PowerShell> Site > wwwroot. >> Which contains all your files.


这篇关于Flask网站无法正确部署,但可以在http://localhost:8000上正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆