[英]Azure Linux web app, deployed via FTP, files give 404
I have a Azure Linux web app.我有一个 Azure Linux web 应用程序。 I can upload files via FTP (for example test.html) but then accessing them ( https://mysite.azurewebsites.net/test.html ) gives a 404. The files are there, and I can see them in kudu console, but I get 404?
I can upload files via FTP (for example test.html) but then accessing them ( https://mysite.azurewebsites.net/test.html ) gives a 404. The files are there, and I can see them in kudu console,但我得到404? I even deleted the "hostingstart" file yet going to https://mysite.azurewebsites.net still returns the hostingstart file content?
我什至删除了“hostingstart”文件但转到https://mysite.azurewebsites.net仍然返回 hostingstart 文件内容? Do I need to trigger a "redeploy" somehow?
我是否需要以某种方式触发“重新部署”? The documentation I have read just says "upload the files via ftp to /home/site/wwwroot which is what I have done.
我读过的文档只是说“通过 ftp 将文件上传到 /home/site/wwwroot 这就是我所做的。
??? ???
I turned on all logging, but was getting nothing meaningful.我打开了所有日志记录,但没有任何意义。 I raised a support ticket and got a response that explains it.
我提出了一张支持票并得到了解释它的回复。 A.Net platform on Linux cannot serve static content;
Linux 上的 A.Net 平台无法提供 static 内容;
response from Microsoft:来自微软的回应:
Analysis:分析:
http://mysite.azurewebsites.net/ http://mysite.azurewebsites.net/
Is a Linux web app with the custom image是带有自定义图像的 Linux web 应用程序
DOTNETCORE|3.1 Hosted inside a B1 App Service Plan DOTNETCORE|3.1 托管在 B1 应用服务计划中
The requests are served by a single Small web worker.这些请求由单个 Small web 工作人员提供服务。
This type of web app expects.Net Core content not plain HTML.这种类型的 web 应用程序需要.Net Core 内容不是普通的 HTML。 If you want to deploy plain HTML you can use a Windows web app or a Linux web app with PHP, as on a Windows web app there is IIS and on PHP there is Apache as web servers that by default are able to serve static content also.
If you want to deploy plain HTML you can use a Windows web app or a Linux web app with PHP, as on a Windows web app there is IIS and on PHP there is Apache as web servers that by default are able to serve static content also .
for static content you can also use only your storage to deploy.对于 static 内容,您也可以仅使用您的存储进行部署。
https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.