How will I host a static HTML page on Azure linux web app?

末鹿安然 提交于 2020-06-29 04:12:49

问题


I have a HTML page which I want to host on Azure web app. I need to host this HTML page in a resource group which is under OS Linux and so I ran the below azure cli command but, it failed.

az webapp up -n surveyordemohtmlpage --html -g MyResource-Group --plan MyPlan -l westeurope

It was throwing error that MyResource-Group cannot be used with the os windows, use different RG

But, I need to use this particular RG as, I need to connect with other web apps in the same RG which are all hosted in linux OS.

Let me know for any suggestion. How will I change the os to linux in the cli command.


回答1:


az webapp up : Experimental command to create and deploy a web app. Current supports includes Node, Python on Linux & .NET Core, ASP.NET, staticHtml on Windows.

Hosting static HTML app on Linux is not supported at this time.

Probably you can create it in another RG and configure CORS on the web app.




回答2:


As mentioned in the docs for az webapp up, current support includes Node, Python, .NET Core and ASP.NET. Node, Python apps are created as Linux apps. .Net Core, ASP.NET, and static HTML apps are created as Windows apps.

Also, if you are opting to host your static website with Azure Storage, please know that CORS is not supported with static website.

Here is a blog post consolidating available options.



来源:https://stackoverflow.com/questions/62432765/how-will-i-host-a-static-html-page-on-azure-linux-web-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!