Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using HAProxy as a load balancer and i'd like to redirect any traffic that comes in on 443 (HTTPS) to 80 (HTTP). My site doesn't support HTTPS at all and i'd rather just redirect users than cause any SSL warnings in browsers.

All I can find is using the redirect location <to> syntax, but as far as I can tell that requires me to hard code the hostname. The load balancer receives connections for various hostnames so would like to keep it relative.

share|improve this question
    
Why would there be any https traffic at all? –  Michael Hampton Dec 8 '12 at 22:37
    
If someone hits up the site with https:// I don't want their request to hit a dead end. –  tarnfeld Dec 8 '12 at 22:38
    
They'd still get a certificate warning before the redirect and there is not point serving something that you don't serve ;). Just don't enable https. –  Christopher Perrin Dec 8 '12 at 23:04

1 Answer 1

up vote 2 down vote accepted

That won't work. If a user enters https://example.com into their browser and it connects to port 443 then it requires SSL to be there. You can't even cause the redirect without having SSL properly set up.

In other words: if a user already connects to 443 then it's too late for you to avoid proper SSL.

Keeping the port closed is probably the "best" thing you can do - apart from getting SSL setup properly.

share|improve this answer
    
Bah! Of course. Nevermind. –  tarnfeld Dec 8 '12 at 23:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.