Reverse Proxy in front of GCP load balancer

Hello!

I’m trying out fly if it can help me solve my problem. I’m starting a saas that offers custom domains for my customer. The app is on Google Cloud Platform behind a google load balancer. After adding some certificates to the load balancer, I realized that google load balancer can only have 10 - 15 SSL certificates max.

So I try to setup a fly reverse proxy in front of the google load balancer, following this https://fly.io/docs/app-guides/openresty-nginx-plus-lua/

However https://supsewproxy.fly.dev/test/ just redirect to the balancer domain, while the api/ correctly work as example. Can anyone give me pointer where I went wrong?
Thank you!

Here’s my default.conf

    server {
        listen 80;
        location /test/ {
            proxy_pass http://balancer.supersewa.id/;
        }

        location /api/ {
            proxy_pass http://jsonplaceholder.typicode.com/posts/;
        }
    }

I think this is happening because balancer.supersewa.id redirects http -> https. What happens if you use proxy_pass https://balancer.supersewa.id/ in your config?

1 Like

Wow, doh! Thanks kurt, that is the problem! you saved me a lot of headache

1 Like