Reputation: 25
I have a Azure Linux web app. 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 even deleted the "hostingstart" file yet going to https://mysite.azurewebsites.net still returns the hostingstart file content? 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.
???
Upvotes: 0
Views: 311
Reputation: 25
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;
response from Microsoft:
Analysis:
http://mysite.azurewebsites.net/
Is a Linux web app with the custom image
DOTNETCORE|3.1 Hosted inside a B1 App Service Plan
The requests are served by a single Small web worker.
This type of web app expects .Net Core content not plain 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.
for static content you can also use only your storage to deploy.
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website
Upvotes: 1