如何将虚拟应用程序添加到Web应用程序? [英] How to add a virtual application to a Web App?

查看:73
本文介绍了如何将虚拟应用程序添加到Web应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在同一个Web应用程序下运行2个应用程序,但是我无法同时运行两个应用程序.到目前为止,我一次只能运行其中一个.

I am trying to run 2 applications under the same web app, but i have trouble running both in the same time. So far i am able to run only one of them at a time.

应用程序:

  • myapp1-角度应用程序,因此只有静态文件和一个web.config文件才能使该应用程序正常运行
  • myapp2-Java应用程序,它作为战争软件包进行了部署

我想实现这一目标:

  • myapp.azurewebsites.net/-应指向myapp1
  • myapp.azurewebsites.net/myapp2-应指向myapp2

在应用程序设置中,我启用了Java(最新)和tomcat 8.5,在虚拟应用程序部分中,我将/指向了有角度文件所在的site \ wwwroot,将/myapp2指向了site \ wwwroot \ webapps \ myapp2,其中是部署myapp2.war时创建的文件夹.

In the application settings i have enabled java (latest) and tomcat 8.5, in the virtual app section i pointed / to site\wwwroot, where the angular files are, and /myapp2 to site\wwwroot\webapps\myapp2, which is the folder being created when deploying myapp2.war. 

我还尝试将角度应用程序放置在site \ myapp1中,并将myapp2作为ROOT.war部署在webapps文件夹中,但也部署在webapp2文件夹中,但仍然无法正常工作.

I also tried to put the angular app in site\myapp1 and myapp2 was deployed as ROOT.war in the webapps folder, but also in webapp2 folder and still doesn't work.

myapp2.war没有web.config.我需要一个吗?我将它用于部署为jar的应用程序,不确定是否需要此应用程序.

the myapp2.war doesn't have a web.config. Do i need one? I used one for an app deployed as a jar, not sure if needed for this one.

我想念什么?

推荐答案

您如何精确部署网站?确保已更改/指定了确切的目标URL",以防您进行部署 通过Visual Studio.如果您有任何帮助(访问第二个站点时)能更好地了解您的问题,那么如果您可以共享站点的错误消息,那就太好了.

How exactly have you deployed your sites? Ensure that, you have changed/specified the exact ‘destination URL’ in case you are deploying through Visual Studio. It would be great if you can share the error message of your site if you are getting any (when accessing the second site) to understand your issue better.

自您以来部署为两个不同的项目/站点,建议您使用两个不同的配置进行部署.

我建议您,请选中应用程序设置"下的应用程序"复选框,然后查看是否有助于解决问题.

请注意, ,在Azure Web Apps中,每个站点及其子应用程序都在同一应用程序池中运行.如果您的站点有多个孩子 使用多个应用程序池的应用程序,将它们合并到具有通用设置的单个应用程序池中,或将每个应用程序迁移到单独的Web应用程序.

Note that, in Azure Web Apps, each site and its child applications run in the same application pool. If your site has multiple child applications utilizing multiple application pools, consolidate them to a single application pool with common settings or migrate each application to a separate web app.

您可以想查看博客文章 将多个虚拟目录部署到单个Azure网站 有关更多详细信息.

You may want to check the blog post Deploying multiple virtual directories to a single Azure Website for more details.


这篇关于如何将虚拟应用程序添加到Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆