Frontend IP is not opening up the website in google cloud load balancer

googlegoogle-cloud-dnsgoogle-cloud-platformgoogle-compute-engineload balancing

So, Yesterday I have setup load balancer for my WordPress instances on compute engine. I have created an instance group. In load balancer, I have reserved on static IP for my frontend as well. I am using https for my frontend. I have added the frontend IP to my DNS 'A' record of the domain. Its been more 24 hours, I am not being able to access my WordPress site with frontend IP or my domain name. All I am getting a 404 error page from google. I can access my website perfectly with the static IP of my VM instances. What could have possibly gone wrong?

Best Answer

In order to achieve your requirement, could you please verify the below set-up for your environment :

  1. Create an un-managed or managed Instance group with wordpress server as its template

Goto Compute Engine >> Instance groups and click Create instance group

  • In Name enter name
  • In Location choose Single-zone
  • In Region choose your preferred region
  • Click Specify port name mapping
  • In Port name enter http and in Port numbers enter 80
  • In Group type choose Managed instance group
  • In Instance template select the instance template you just created
  • Leave everything to default and click Create
  1. Reserve Global Region IPv4

Go to VPC network >> External IP addresses and click Reserve Static IP Address

  • In Name enter a name for IPv4 address
  • In Network Service Tier choose Premium
  • In IP version choose IPv4
  • In Type choose Global
  • Click Reserve
  1. Create Load Balancer

Go to Network Services >> Load Balancing and Click Create Load Balancer

  • In the HTTP(S) Load Balancing click Start Configuration -Create Load Balancer

Backend configuration

  • Enter a name for your Load Balancer and click Backend configuration
  • In Backend services & backend buckets select Backend service >> Create backend service
  • Enter a name for your backend service
  • In Backend Type choose Instance group
  • In Backends select the Instance group you created
  • In Port numbers enter 80
  • In Balance mode choose Utilization
  • Click Done
  • Check Enable Cloud CDN ( optional )
  • Load balancing create backend service

Create Health Check

  • In Health Check click create health check
  • In Name enter a health check name
  • In Protocol select HTTP
  • In Port enter 80
  • In Proxy protocol select None
  • Request Path type " \ "
  • In Check Interval enter 10
  • In Timeout enter 5
  • In Healthy threshold enter 2
  • In Unhealthy threshold enter 3
  • Click Save and Continue

Frontend Configuration

  • Enter a name for your IPv4 frontend configuration
  • In Protocol select HTTPS
  • In IP version select IPv4
  • In IP address select the IP4 address you reserved
  • Select Port 443

Load balancing Frontend configuration

  • In Certificate select Create Certificate
  • Enter a name for your certificate
  • In Create mode choose to Create Google-managed certificate
  • In Domains enter *.yourdomainname.com
  • Load Balancing Google Managed SSL Certificate
  • This setting will issue a Google managed Let’sEncrypt Certificate.

Attention: Once you have created a certificate it will be in the PROVISION status. Once the certificate is ACTIVE, you’ll have SSL issues for a few minutes with the error message ERR_SSL_VERSION_OR_CIPHER_MISMATCH. It took 15 minutes for mine to have everything up and running.

  1. Set-up Cloud DNS
  • Click Create
  • Now Goto Network services >> Cloud DNS and click your domain name
  • Edit the A record and replace the IPv4 address with your newly reserved IPv4 address.
  • Click Add record set
  1. Set-up Cloud CDN ( Optional )

Goto Goto Network services >> Cloud CDN and click Add origin

In Origin select the Load balancer you just created.

Click Add

Now go to Network services >> Load Balancing and wait for 10 – 15 minutes for the Load Balancing settings to propagate. Once done you will see a green checkmark which indicates everything is fine.

Sharing reference youtube video as reference for setup as well.

After verifying the above step , please let me know if the issue still persist and provide the detail error in order to assist you further

Related Topic