Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Load balancer to Virtual Hosting

I have setup a load balancer that connects to a backend Ubuntu server with virtual hosting.  The load balancer will connect to the default virtual host on the Ubuntu server, but my question is if it is possible to setup the load balancer to connect to different virtual hosts on the same backend server based on the headers.    

For example, our DNS is set with subdomains connecting to the same IP.   Based on whether or not they go to https://example1.com or https://site.example1.com the virtual host will provide different page requests.

I have not found any good documentation on whether or not this can be done through setting up a load balancer.   Any information will be helpful.

0 2 96
2 REPLIES 2

Hi @mbrown ,

Welcome to Google Cloud Community!

The setup you want to use it's totally possible. You can find all the needed information related to the configuration of URL based mapping in this link

Good Luck!

Thanks FrancoGP.  I'll take a look at the link.