Setup HTTP(S) Load Balancer on Compute Engine for

2019-08-03 15:54发布

问题:

I'm working to set up an autoscaled WordPress site with Nginx on Compute engine,

Here's my workaround:

  1. I have set up an Instance on which Installed Nginx and set up my WordPress site.

  2. Created a cloud SQL instance for the database of WordPress site.

  3. Create Custom Compute Engine Image from my Instance Disk on which I have set up my WP site.
  4. Then Create an Instance Template using the custom Image I have created.
  5. Then create my required 4 managed, autoscaled instance groups based on the my Instance Template.
  6. Setup an HTTP Load balancer and add all of 4 instance groups in Backend service.
  7. Also, add a health check with the PORT TCP 80 and PATH / When I access the external IP it returns an error like:
  1. That’s an error.

The requested URL / was not found on this server. That’s all we know.

Help me, please!

Thanks in advance!

回答1:

Judging by what you mention, you have followed what is mentioned over at https://cloud.google.com/load-balancing/docs/https/setting-up-https#troubleshooting, however, I would recommend to check out this guide https://blog.realkinetic.com/http-to-https-using-google-cloud-load-balancer-dda57ac97c as it contains a more in depth explanation on how to set up the load balancer using GCP. It seems to me that you miss configured something but it is hard to tell only by what you listed.