1

I am running multiple domains on an EC2 server with a single IP. I need to run 1 site on HTTPS and rest on HTTP.

For instance:

Run foobar.com on HTTPS. And run foobaz.com on HTTP

https://foobar.com works fine as this is suppose to run on https and http://foobaz.com works fine as well. But when I type https://foobaz.com it shows a SSL certificate warning and after clicking continue, it shows the content of the foobar.com.

Any pointers within this context would really help? Thanks in advance!

aatifh
  • 113
  • 3
  • What's your question here? You seem to be saying it works for what you're trying to do, but if you try and do something else it doesn't work? There are now multi domain certificates (although I'm not sure how compatible they are), but basically you need a unique IP for each SSL secured domain. – Rudu Dec 12 '13 at 15:52

1 Answers1

3

That's how it works. Without SNI (http://en.wikipedia.org/wiki/Server_Name_Indication), SSL includes the domain name requested as part of the encrypted payload. The server doesn't know which domain to serve until it presents the default certificate and decrypts, at which point it's already too late.

ceejayoz
  • 32,910
  • 7
  • 82
  • 106