Implementing Multi-Site Hosting via Application BLB

BLB BLB

  • API Reference
    • Access control
    • API Service Domain Name
    • Appendix
    • Application BLB Interface
      • Application BLB Instance Related Interfaces
      • Application BLB Listener Related Interfaces
      • Application BLB Security Group Related Interfaces
      • Application BLB Server Group Related Interfaces
    • Application IPv6 BLB Interface
      • Application IPv6 BLB Instance Related Interfaces
      • Application IPv6 BLB Listener Related Interfaces
      • Application IPv6 BLB Security Group Related Interfaces
      • Application IPv6 BLB Server Group Related Interfaces
    • BLB Order Related Interfaces
      • BLB - Resize
      • BLB Charge Shift - Cancel Prepay to Postpay
      • BLB Charge Shift - Postpay to Prepay
      • BLB Charge Shift - Prepay to Postpay
      • BLB Inquiry
      • BLB Unsubscribe Interface
    • Document Update Records
    • Error code
    • Interface Specifications
    • Introduction
    • Load Balancer Dedicated Cluster LBDC Interface
      • LBDC Instance Related Interfaces
    • Service Publishing Point Interface
      • Service Publishing Point Related Interfaces
    • Standard BLB Interface
      • Standard BLB Instance Related Interfaces
      • Standard BLB Listener Related Interfaces
      • Standard BLB Real Server Related Interfaces
      • Standard BLB Security Group Related Interfaces
    • Standard IPv6 BLB Interface
      • Standard IPv6 BLB Related Interfaces
  • FAQs
    • Billing Problems
    • Common Questions Overview
    • Configuration-related questions
    • Fault-related questions
    • General Problems
    • Load Balancer Dedicated Cluster Related Issues
    • Performance-related questions
    • Security Problems
  • Function Release Records
  • Operation guide
    • Access control
    • Access Logs
    • Application BLB instance
    • Application IPv6 Instance
    • BLB metric description
    • Certification
    • Custom configuration
    • Extended domain name
    • General-purpose BLB instance
      • Creating BLB Ordinary Instance
      • Managing BLB Ordinary Instance
    • General-purpose IPv6 BLB instance
    • Identity and access management
    • IP Group Usage Guide
    • Load Balance Dedicated Cluster
    • Load Balancer Frontend and Backend Protocol Correspondence
    • Recording Access Logs Using VPC Flow Logs
    • Service Release Point
    • Tag Management
  • Product Description
    • Application scenarios
    • Basic Architecture
    • Basic concepts
    • Performance Specification Description
    • Product advantages
    • Product features
    • Product Introduction
    • Usage restrictions
  • Product pricing
    • Load Balancer Dedicated Cluster Billing
    • Load Balancer Instance Billing
  • Quick Start
  • SDK
    • GO-SDK
      • Application BLB Instance
      • Initialization
      • Install
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Ordinary BLB Instance
      • Overview
      • Service Release Point
      • Version Change Records
    • Java-SDK
      • Application BLB instance
      • General-purpose BLB instance
      • Initialization
      • Install the SDK Package
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Overview
      • Service Release Point
      • Version Update Description
    • PHP-SDK
      • Initialization
      • Install
      • Ordinary BLB Instance
      • Overview
    • Python-SDK
      • Application BLB Instance
      • Initialization
      • Install
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Ordinary BLB Instance
      • Overview
      • Service Release Point
      • Version Update Description
  • Service Level Agreement (SLA)
    • Description of Baidu AI Cloud Load Balancer Trusted Cloud certification service availability
    • LBDC Service Level Agreement SLA
    • BLB Service Level Agreement (V2.0)
  • Typical Practices
    • BLB Selection Guide
    • Health Check Exception Troubleshooting
    • Implementing BLB Association with Listeners, Real Servers, Security Groups, etc. via Terraform
    • Implementing Multi-Site Hosting via Application BLB
    • Load Balancer Security Protection Strategy
    • Managing BLB via Terraform
    • Obtaining Client Information via Application BLB Instance
    • Using IP Group Function to Mount Real Servers Across VPCs in Different Regions
    • Using IP Group Function to Mount Real Servers Across VPCs in the Same Region
All documents
menu
No results found, please re-enter

BLB BLB

  • API Reference
    • Access control
    • API Service Domain Name
    • Appendix
    • Application BLB Interface
      • Application BLB Instance Related Interfaces
      • Application BLB Listener Related Interfaces
      • Application BLB Security Group Related Interfaces
      • Application BLB Server Group Related Interfaces
    • Application IPv6 BLB Interface
      • Application IPv6 BLB Instance Related Interfaces
      • Application IPv6 BLB Listener Related Interfaces
      • Application IPv6 BLB Security Group Related Interfaces
      • Application IPv6 BLB Server Group Related Interfaces
    • BLB Order Related Interfaces
      • BLB - Resize
      • BLB Charge Shift - Cancel Prepay to Postpay
      • BLB Charge Shift - Postpay to Prepay
      • BLB Charge Shift - Prepay to Postpay
      • BLB Inquiry
      • BLB Unsubscribe Interface
    • Document Update Records
    • Error code
    • Interface Specifications
    • Introduction
    • Load Balancer Dedicated Cluster LBDC Interface
      • LBDC Instance Related Interfaces
    • Service Publishing Point Interface
      • Service Publishing Point Related Interfaces
    • Standard BLB Interface
      • Standard BLB Instance Related Interfaces
      • Standard BLB Listener Related Interfaces
      • Standard BLB Real Server Related Interfaces
      • Standard BLB Security Group Related Interfaces
    • Standard IPv6 BLB Interface
      • Standard IPv6 BLB Related Interfaces
  • FAQs
    • Billing Problems
    • Common Questions Overview
    • Configuration-related questions
    • Fault-related questions
    • General Problems
    • Load Balancer Dedicated Cluster Related Issues
    • Performance-related questions
    • Security Problems
  • Function Release Records
  • Operation guide
    • Access control
    • Access Logs
    • Application BLB instance
    • Application IPv6 Instance
    • BLB metric description
    • Certification
    • Custom configuration
    • Extended domain name
    • General-purpose BLB instance
      • Creating BLB Ordinary Instance
      • Managing BLB Ordinary Instance
    • General-purpose IPv6 BLB instance
    • Identity and access management
    • IP Group Usage Guide
    • Load Balance Dedicated Cluster
    • Load Balancer Frontend and Backend Protocol Correspondence
    • Recording Access Logs Using VPC Flow Logs
    • Service Release Point
    • Tag Management
  • Product Description
    • Application scenarios
    • Basic Architecture
    • Basic concepts
    • Performance Specification Description
    • Product advantages
    • Product features
    • Product Introduction
    • Usage restrictions
  • Product pricing
    • Load Balancer Dedicated Cluster Billing
    • Load Balancer Instance Billing
  • Quick Start
  • SDK
    • GO-SDK
      • Application BLB Instance
      • Initialization
      • Install
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Ordinary BLB Instance
      • Overview
      • Service Release Point
      • Version Change Records
    • Java-SDK
      • Application BLB instance
      • General-purpose BLB instance
      • Initialization
      • Install the SDK Package
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Overview
      • Service Release Point
      • Version Update Description
    • PHP-SDK
      • Initialization
      • Install
      • Ordinary BLB Instance
      • Overview
    • Python-SDK
      • Application BLB Instance
      • Initialization
      • Install
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Ordinary BLB Instance
      • Overview
      • Service Release Point
      • Version Update Description
  • Service Level Agreement (SLA)
    • Description of Baidu AI Cloud Load Balancer Trusted Cloud certification service availability
    • LBDC Service Level Agreement SLA
    • BLB Service Level Agreement (V2.0)
  • Typical Practices
    • BLB Selection Guide
    • Health Check Exception Troubleshooting
    • Implementing BLB Association with Listeners, Real Servers, Security Groups, etc. via Terraform
    • Implementing Multi-Site Hosting via Application BLB
    • Load Balancer Security Protection Strategy
    • Managing BLB via Terraform
    • Obtaining Client Information via Application BLB Instance
    • Using IP Group Function to Mount Real Servers Across VPCs in Different Regions
    • Using IP Group Function to Mount Real Servers Across VPCs in the Same Region
  • Document center
  • arrow
  • BLBBLB
  • arrow
  • Typical Practices
  • arrow
  • Implementing Multi-Site Hosting via Application BLB
Table of contents on this page
  • Overview
  • Requirement scenarios
  • Solution overview
  • Configuration steps
  • Environment preparation
  • Add target group
  • Add a HTTP listener
  • Configure forwarding rules
  • Access test
  • Related products

Implementing Multi-Site Hosting via Application BLB

Updated at:2025-10-16

Overview

This document primarily explains how to configure an application BLB to distribute requests for accessing different domain names to various real servers.

Requirement scenarios

You Users often encounter scenarios of multi-site access, where multiple domain names resolve to the same EIP, and different servers provide services for different sites at the backend. In this case, we can use application BLB to meet the demand for multi-domain forwarding access.

Solution overview

As illustrated in the figure below, create three BCCs within the same VPC—one serving as the test client and the other two functioning as WebServers for website services—and establish an application BLB instance in the same VPC for traffic load distribution.

image.png

Configuration steps

Environment preparation

  1. Create a VPC. For specific steps to create a VPC, refer to Create VPC.
  2. Create a subnet within the VPC. For specific steps to create a subnet, refer to Create Subnet.
  3. Create three BCCs in the subnet: bcc1, bcc2, and bcc3 respectively. For specific steps to create a BCC, refer to Create BCC Instance.
  4. Deploy and install Nginx on two BCC servers among them, then start the corresponding website services with the addresses of www.bcc1testsdkhfahsdfh.com and www.bcc2testsdkhfahsdfh.com. For deploying Nginx in CentOS, refer to CentOS-7.2 LNMP Environment Deployment.
  5. Purchase an application BLB instance in the subnet. For specific steps to purchase an application BLB instance, refer to Application BLB Instance.

Add target group

  1. Navigate to Product & Service > Baidu Load Balancer (BLB) to access the Baidu Load Balancer (BLB) list.
  2. Click the ID link in the Load Balancer ID/Name column to open the Instance Details page.
  3. Click the "Target Group" tab, select "Add Server Group", and configure the name, description, port and server of the server group in the pop-up window. Here, we add BCC1 and BCC2 to the two target groups BCC_GROUP1 and BCC_GROUP2 respectively. For specific operations on configuring target group, please refer to Target Group Configuration.

image.png

Add a HTTP listener

The listener configuration consists of two parts: Configuring Information and Setting Health Check.

  1. Go to Product & Service > Baidu Load Balancer (BLB), then click Application Instance to enter the Baidu Load Balancer (BLB) list.
  2. Select the ID link in the Load Balancer ID/Name column to visit the Instance Details page. Next, click on the "Listener Settings" tab to access the listener section, and then select "Create Listener."
  3. For the listener's BLB protocol, choose HTTP and select the port corresponding to the Nginx service. For instance, the default port 80 is used in this example.

image.png

Configure forwarding rules

In the forwarding rules, click "Add Rule" to create two rules:

Rule 1: Select "Domain Name" as the matching condition, enter "*.bcc1testsdkhfahsdfh.com" as the matching content, select the target group where BCC1 resides as the target group, and choose port 80

Rule 2: Select "Domain Name" as the matching condition, enter "*.bcc1testsdkhfahsdfh.com" as the matching content, select the target group where BCC2 resides as the target group, and choose port 80

image.png

For detailed instructions on application BLB listener and forwarding rules, refer to the Configuration Application BLB Instance Listener.

Access test

Set up domain name resolution on the client (simulating real access scenarios), resolving both www.bcc1testsdkhfahsdfh.com and www.bcc2testsdkhfahsdfh.com to the frontend IP of the BLB.

image.png

When accessing www.bcc1testsdkhfahsdfh.com and www.bcc2testsdkhfahsdfh.com, you can observe that requests are accurately distributed to the respective BCCs.

image.png

Related products

Baidu Cloud Compute (BCC) and EIP

Previous
Implementing BLB Association with Listeners, Real Servers, Security Groups, etc. via Terraform
Next
Load Balancer Security Protection Strategy