I have a HTTP and HTTPS load balancer on Goole Cloud. Is it possible to set it up to enforce (redirect) all connections to HTTPS?
Google HTTP load balancing enforce HTTPS
2.1k views Asked by Upio At
2
There are 2 answers
1
On
Why bother to redirect? You could easily create new (SSL) global forwarding rule and point it to your backend service.
For example, http://107.178.251.37/ points to my HTTP backend and I've added another global forwarding rule to make it SSL: https://107.178.240.233/.
Not at the load balancer as of June 2015.
As an alternative, you can configure your web servers to return 301 for all HTTP requests redirecting to the HTTPS version.
For Apache (from https://wiki.apache.org/httpd/RedirectSSL):
For nginx (from https://serverfault.com/questions/67316/in-nginx-how-can-i-rewrite-all-http-requests-to-https-while-maintaining-sub-dom):