HTTP redirecting to HTTPS with NodeBalancer

I have a single NodeBalancer that references two VPS nodes running nginx as a proxy to a web application. Currently the NodeBalancer is set to TCP mode and the nginx instances on the VPS nodes handle the SSL communication and proxy to the web app instances which are also on the VPS nodes.

My NodeBalancer is set to listen on port 443.

I have two questions -

1. I would like to automatically forward http traffic to the https protocol but since my NodeBalancer is listening on the SSL port I am not sure how to capture the HTTP traffic.

2. I would like to change the NodeBalancer type to be HTTPS so that it can handle the certificate etc. but I am unsure of how the NodeBalancer should communicate to the nginx instances in this setup. Would this communication also be performed over SSL or should I consider the NodeBalancer to be the proxy and remove the nginx instances between the web applications and the NodeBalancer.

Kind regards.

[Update - Resolved]

1. I created two configurations on the NodeBalancer one for http and one for https, the nginx instance on the nodes redirects all http traffic to the https host.

2. I realized that the NodeBalancer is just a proxy so my nnginx instances listen on port 8000 and the NodeBalancer is the termination point for the https traffic.

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct