I configured an AWS Load Balancer. It is working find on HTTP, but when I try over HTTPS I get a 504 Gateway Timeout Error. I tried all the suggestions on AWS's help page (increase idle timeout), but no luck. Any ideas why it wouldn't work over HTTPS, but still work over HTTP?

Both the Instance and Load Balancer security groups have HTTP and HTTPS enabled

The load balancer has HTTP and HTTPS listeners (note the LB does not terminate the SSL cert, it has 443 on front and back end port)

If I change it to be 443/80 (front/back) it works.

I do want it to be 443/443. But when I set it up this way I get the 504 error.

  • Is the instance listening on 443? – ceejayoz Sep 18 '15 at 20:59
  • Yes. Direct to instance (over IP) on 443 works. – user472292 Sep 18 '15 at 21:01
  • 1
    What's in the instance logs to correspond with the 504s on the front end? Note also, that 443 front and back does not mean the ELB is not terminating the SSL. In fact, if you think it does, that is potentially part of the problem. – Michael - sqlbot Sep 19 '15 at 1:34
  • I understand that the LB is not terminating the SSL. I was saying that was what I wanted. – user472292 Sep 19 '15 at 14:32
  • There are no IIS logs when I get the 504s. I don't even think traffic is getting to the server. – user472292 Sep 19 '15 at 14:32

Make sure that you've selected HTTPS as Instance protocol. I've had set 443 both as LB and instance ports but HTTP selected as Instance Protocol and exactly the same behaviour.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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