Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Using Application Gateway to realize multi-site hosting

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

If you come into contact with more partners, you will find that the needs of partners are really varied. Recently, some partners put forward this demand: "host multiple different Web sites under the same load balancer device, so that when you visit the domain name of each website, you can be directed to the pool you visit." Through the analysis of the needs of small partners, we decided to use Azure Application Gateway's multi-site hosting to meet their needs:

With multi-site hosting, you can configure multiple Web sites on the same application gateway instance. This feature allows you to configure a more efficient topology for deployment by adding up to 100 websites to an application gateway. Each site can be directed to its own pool. For example, an application gateway can come from two server pools called ContosoServerPool and FabrikamServerPool as traffic contoso.com and fabrikam.com.

Request http://contoso.com to route to ContosoServerPool and http://fabrikam.com to FabrikamServerPool.

Note: similarly, two child domains of the same parent domain can be hosted in the same application gateway deployment. Examples of using subdomains can include http://blog.contoso.com and http://app.contoso.com hosted on a single application gateway deployment.

Having said so much, let's take a look at how to achieve this requirement.

Create Application Gateway

Click "create Resource"-"Network"-"Application Gateway":

Set the Application Gateway name and choose to use the WAF layer:

Select the virtual network and the subnet used by Application Gateway, and set the front-end IP address configuration:

Confirm and click to create:

The creation is completed as shown in the following figure:

Add backend Pool

Add a Web01 backend pool:

Click "Backend pools"-"Add", enter the relevant information in the location of adding the backend pool, and select the backend pool "Web01-test" that we have prepared:

Add a Web02 backend pool:

Click "Backend pools"-"Add", enter the relevant information in the location of adding the backend pool, and select the backend pool "Web02-test" that we have prepared:

Add is complete, as shown in the following figure:

Configure listeners

Click "Listeners"-"+ Multi Site":

Add a Web01 as shown in the following figure:

Note: for Host name location, you need to enter the domain name accessed by the user:

Add a Web02 as shown in the following figure:

Note: for Host name location, you need to enter the domain name accessed by the user:

Configure Rule

Click "Rule" + "+ basic":

Add the backend pool of Web01 and select the corresponding listener:

Add the backend pool of Web02 and select the corresponding listener:

The addition is completed as shown in the following figure:

Set up domain name resolution in the public network domain name resolution institution:

After domain name resolution is configured, verify that web01.mspcloud.club and web02.mspcloud.club are resolved to the same address:

Using a browser to access web01.mspcloud.club, you can see that you can jump to Web01:

Using a browser to access web02.mspcloud.club, you can see that you can jump to Web02:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report