两个子域指向不同的虚拟目录
is it possible in Azure web services?
此讨论 主题.
You may use URL rewrite rule which takes the hostname of the request and rewrites the request URL to start with the subdomain extracted from the hostname. See this discussion thread.
如果您的要求适合,则可以为每个子域创建一个新的webapp,并将它们全部放入同一App Service计划中.看到这个 讨论线程 以获取更多详细信息.
If your requirement fits, you could create new webapp for each subdomain and place them all into the same App Service plan. See this discussion thread for more details.
此外,默认情况下,App Service将网络请求定向到您的应用程序代码的根目录.但是,某些Web框架并非以 根目录.例如, ,Laravel开始于public子目录.要继续使用contoso.com DNS示例,可以在http://contoso.com/public上访问此类应用, 但您确实希望直接将http://contoso.com 定向到public目录.此步骤不涉及DNS解析,而是自定义虚拟目录.签出文件 重定向到自定义目录 有关此主题的详细信息.
Furthermore, by default, App Service directs web requests to the root directory of your app code. However, certain web frameworks don't start in the root directory. For example, Laravel starts in the public subdirectory. To continue the contoso.com DNS example, such an app would be accessible at http://contoso.com/public, but you would really want to direct http://contoso.com to the public directory instead. This step doesn't involve DNS resolution, but customizing the virtual directory. Checkout the document Redirect to a custom directory for details on this topic.
------ -------------------------------------------------- -------------------------------------------------- ------
如果此答案有帮助,请单击标记为答案"或投票.要提供有关您的论坛体验的其他反馈,请单击
.
If this answer was helpful, click "Mark as Answer" or Up-Vote. To provide additional feedback on your forum experience, click
here.