Scenario:
I have an express.js server which serves variations of the same static landing page based on where req.headers.host
says the user is coming from - think sort of like A/B testing.
GET tulip.flower.com
serves pages/flower.com/tulip.html
GET rose.flower.com
serves pages/flower.com/rose.html
At the same time, this one IP is also responsible for:
GET potato.vegetable.com
serving pages/vegetable.com/potato.html
It's important that these pages are served FAST, so they are precompiled and optimized in all sorts of ways.
The server now needs to:
- Provide separate certificates for
*.vegetables.com
,*.fruits.com
,*.rocks.net
- Optionally provide no certificate for
*.flowers.com
- Offer HTTP2
The problem is that HTTP2 mandates a certificate, and there's now multiple certificates in play.
It appears that it's possible to use multiple certificates on one Node.js (and presumably by extension Express.js) server, but is it possible to combine it with a module like spdy, and if so, how?
Instead of hacking node, would it be smarter to pawn the task of sorting out http2 and SSL to nginx? Should the caching network like Imperva or Akamai handle this?