简体   繁体   English

如何在ILB ASE中将Web应用程序保持为api app调用

[英]How to keep web app to api app calls within ILB ASE

I have web and api app deployed within ILB ASE fronted by Application Gateway.Would I be able to make the calls from my web app to api app without exposing api app externally? 我在面向Application Gateway的ILB ASE中部署了web和api应用程序。我是否能够从我的Web应用程序调用api应用程序,而不会在外部暴露api应用程序? If so, how can I do that? 如果是这样,我该怎么做?

I configured application gateway to point to the front end web app. 我将应用程序网关配置为指向前端Web应用程序。 I created internet routable domain and added to custom domain in my web app. 我创建了互联网可路由域,并在我的网络应用中添加到自定义域。 In my DNS, I pointed the custom domain to hostname of the application gateway and I am able to logon to my web app. 在我的DNS中,我将自定义域指向应用程序网关的主机名,并且我能够登录到我的Web应用程序。 But, I see my web app written in AngualarJS is making XMLHttpRequest to backend API URL and as the backend API URL can not be resolved from my desktop, it is failing. 但是,我看到我在AngualarJS中编写的Web应用程序正在使用XMLHttpRequest来后端API URL,并且由于无法从我的桌面解析后端API URL,因此它失败了。

My requirement is not to expose API app outside of the ILB ASE VNET. 我的要求是不要在ILB ASE VNET之外公开API应用程序。 Any suggestions? 有什么建议么?

If you want the web app and API could communicate with each other in an ILB ASE, you need to deploy an internal DNS service. 如果您希望Web应用程序和API可以在ILB ASE中相互通信,则需要部署内部DNS服务。 For example, you could deploy a custom DNS server on Azure VM in the same Azure VNet. 例如,您可以在同一Azure VNet中的Azure VM上部署自定义DNS服务器。 You can specify DNS server IP addresses in the VNet settings . 您可以在VNet设置中指定DNS服务器IP地址 The VNet is your ASE subnet located. VNet是您的ASE子网。

Please note that restart ASE after DNS IP address is added to VNet if you add the DNS after you deploy ASE. 请注意,如果在部署ASE后添加DNS,则在DNS IP地址添加到VNet后重新启动ASE。 You could refer to this and read more details about custom DNS in ASE . 您可以参考此内容并阅读有关ASE中自定义DNS的更多详细信息。 Let me know if this works. 让我知道这个是否奏效。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Azure中解决在ILB ASE中创建的功能应用程序无法访问的问题? - How will fix Inaccessible issue for function app created in ILB ASE in azure? 如何从同一 ASE 内的 Web 应用程序调用 Azure ILB ASE 内的 API - How to call an API inside an Azure ILB ASE from a webapp within the same ASE 基于App Gateway路径的路由不适用于ILB ASE - App Gateway path based routing not working with ILB ASE 在 ASE ILB 中创建具有相同名称的 Azure Web 应用程序,不会警告资源已存在,也不会创建 2 个具有相同名称的 Web 应用程序 - Creating Azure web app inside ASE ILB with the same name, does not warn about a resource already exists nor does create 2 web apps with the same name ILB应用服务环境出站流量 - ILB App Service Environment Outbound Traffic 无法在 ASE 托管的 Linux 应用服务计划上提供 API 应用 - Unable to provision API App on Linux App Service Plan hosted in ASE Azure ASE 中的应用程序需要使用 NTML Web 服务进行身份验证 - App in Azure ASE needs to authenticate with NTML Web Service 在 Azure ILB ASE 中部署 Azure 机器人时出现异常 - Exception on deploying Azure bot in Azure ILB ASE 无法使用IP地址访问托管在应用程序服务环境ILB中的Azure Web应用程序,但可以使用FQDN访问相同的Web应用程序 - Unable to access an azure web app hosted inside an Application Service Environment ILB using IP address but able to access the same using FQDN 如何将应用程序服务添加到具有 ASE 的 Azure 网关 - How to add an app service to Azure Gateway having an ASE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM