在同一个 azure web 应用程序上创建虚拟目录 [英] Create virtual directory on same azure web app
问题描述
我有一个在 Azure 上运行的应用程序,我需要复制该应用程序,以便不同的用户可以访问例如 site.com/s1 和 site.com/s2 并将它们分开使用.应用一样,数据库会变.
我尝试为我的应用程序创建一个虚拟目录,但每次都出现相同的错误:虚拟路径‘/s1’的物理路径无效."
我尝试从 FTP 创建物理目录,我可以看到新目录,但 Azure 无法将其识别为物理目录.
我想要 wwwroot/s1 wwwroot/s2 并按照我之前解释的方式访问这些应用程序.
请尝试在 Azure 门户上配置虚拟目录 site/test1
如下图
当我们将 WebApp 推送到 Azure 时,我们需要在连接"选项卡的站点名称"和目标 URL"部分中包含虚拟目录路径
之后我们就可以访问带有sitename/site1的WebApp
我们也可以通过 Azure Kudu 工具(
I have an application running on Azure, what I need is to have the application copied so different users can access for example site.com/s1 and site.com/s2 and use them as separate. The application is the same, the database will change.
I tried to create a virtual directory for my app but I get the same error every time: "The physical path for virtual path '/s1' is invalid."
I tried creating a physical directory from FTP and I can see the new directory, but Azure don't recognize it as a physical one.
I would like to have wwwroot/s1 wwwroot/s2 and access those apps the way I explained before.
Please have a try to config the Virtual directory site/test1
on the Azure portal as following screenshot
When we push the WebApp to the Azure, we need to include the virtual directory path in the Site Name and Destination URL sections on the Connection tab
After that we can visit the WebApp with sitename/site1
We also can check the uploaded file from Azure Kudu tool (https://sitename.scm.azurewebsites.net/DebugConsole/?shell=powershell)
这篇关于在同一个 azure web 应用程序上创建虚拟目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!