How to have individual nip.io URL for each API proxy of an environment?

Team,

In my GCP Project, I do have one APIGEE instance tied to one region with one load balancer for env1 & env2 environments. I would like to keep individual URL for each API Proxy of an environment. Is it possible to do this in APIGEE-X? If yes how to route the traffic to each API Proxy from loadbalancer using individual URLs.

api1.env1.domain.nip.io (LB frontend URL) - env1 - api1 - env1.domain.nip.io/api1 (apigee URL)
api2.env1.domain.nip.io(LB frontend URL) - env1 - api2 - env1.domain.nip.io/api2 (apigee URL)
api1.env2.domain.nip.io(LB frontend URL) - env2 - api1 - env2.domain.nip.io/api1 (apigee URL)
api2.env2.domain.nip.io(LB frontend URL) - env2 - api2 - env2.domain.nip.io/api2 (apigee URL)

Solved Solved
1 1 208
1 ACCEPTED SOLUTION

I am able to achieve this ask by adding Routing rules of Load Balancer as below.

 
defaultService: backendService: global/backendServices/BACKEND_SERVICE_1
name: api1-env1-rule
routeRules:
- matchRules:
- prefixMatch: /
priority: 0
routeAction:
weightedBackendServices:
- backendService: global/backendServices/BACKEND_SERVICE_1
weight: 100
urlRewrite:
pathPrefixRewrite: /api1
hostRewrite: env1.domain.nip.io

View solution in original post

1 REPLY 1

I am able to achieve this ask by adding Routing rules of Load Balancer as below.

 
defaultService: backendService: global/backendServices/BACKEND_SERVICE_1
name: api1-env1-rule
routeRules:
- matchRules:
- prefixMatch: /
priority: 0
routeAction:
weightedBackendServices:
- backendService: global/backendServices/BACKEND_SERVICE_1
weight: 100
urlRewrite:
pathPrefixRewrite: /api1
hostRewrite: env1.domain.nip.io