Tito Valentin
Tito Valentin

Reputation: 67

GCE Network Load Balancing

I have two websites functioning under Google Compute Engine VM instances. Both sites accept requests and communicate only via HTTPS and not on HTTP.

How can I properly set a Network Load Balancer forwarding rule under GCE for HTTPS? I have my forwarding rule set on both port 80/443 (HTTP/HTTPS) but my health check always shows unhealthy. It seems like it can't handle HTTPS forwarding.

The way I have my site only doing HTTPS is by having a mod header loaded in Apache and strict transport security enabled. I then have a rewrite rule from HTTP to HTTPS for all requests.

Upvotes: 1

Views: 274

Answers (1)

Adrián
Adrián

Reputation: 2880

As stated here,

There are two types of health checks available:

HTTP health checks, which are required for HTTP and network load balancing.

HTTPS health checks, which are required when setting up backend services to use HTTPS.

Therefore, a network load balancer uses an HTTP health check and it can't handle HTTPS forwarding. You'll need to setup a website, at least for the health check, that allows HTTP and returns an HTTP response with code 200.

Upvotes: 2

Related Questions