I’m using a couple of load balancers in front of my droplets and I only want to allow HTTPS traffic to the LB. There’s an option in the load balancer to “Redirect HTTP to HTTPS” that supposedly should redirect all calls on the 80 port on the load balancer to port 443?
This doesn’t seem to work as I get a “connection refused on port 80” when I access the droplet through the loadbalancer over http.
Is there some additional configuration needed for this redirect to work?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hello,
Yes, it is possible to force the HTTP to HTTPS redirect. You can follow the steps on how to do that here:
Hope that this helps! Regards, Bobby
Thanks @bobbyiliev, that’s what I’ve done but when I test it out with curl http://domain.com
I get a connection refused error for port 80. Using https works as expected.
I have configured a firewall blocking public access to port 80 the droplets from the internet, but I suppose that shouldn’t affect the redirecting, which should happen in the load balancer.
I must be doing something wrong, but can’t see what that would be.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.