Redirect HTTP Request to HTTPS - Keep Load Balancing

My situation is the network load balancer currently only accepts requests on port 80.

I want to be able to redirect URLs to an SSL site but be able to use the load balancing if possible rather than just redirect to a specific URL in which case I would lose the load balancing because I assume I would have to enter in a specific URL when redirecting. Is this possible?
Who is Participating?
nashim khanConnect With a Mentor Exchange AdministratorCommented:

The load balancer always talks to you over http. What is happening is

1.The browser makes a request to port 80 on the load balancer
2.The load balancer makes a request to port 80 on your web server
3.Your web server sends a redirect to the user
4.The user makes a request to port 443 on the load balancer
Steps 2-4 keep repeating until the browser detect the redirect loop and gives up.

EDIT: To resolve this, only perform the rewrite when the X-Forwarded-Proto header is set to http. That header is how Rackspace's load balancer tells your web server the protocol via which it received the request.

Please see the below article.
mathew_sAuthor Commented:
Thanks for the information, I will try this out hopefully in a few days and let you know if I am successful.
mathew_sAuthor Commented:
Just to provide an update. The client wanted for now to set-up SSL only on one server and I was able to do this successfully. In a few weeks, he will be looking to put the load balancer in play at which time I will follow those instructions provided and let you know.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.