Express.js with multiple SSL certificates and HTTP/2


dsp_099

Scenes:

I have an express.js server that serves variations of the same static login page based on req.headers.hostthe source the user says - like an A/B test.

GET tulip.flower.comsupplypages/flower.com/tulip.html

GET rose.flower.comsupplypages/flower.com/rose.html

At the same time , the one IP is also responsible for:

GET potato.vegetable.comServepages/vegetable.com/potato.html

These pages must be served FAST , so they must be precompiled and optimized in various ways .

The server now requires:

  1. Provide separate certificates *.vegetables.com, *.fruits.com,*.rocks.net
  2. (Optional) Do not provide any certificates*.flowers.com
  3. Provide HTTP2

The problem is that HTTP2 mandates one certificate, and now there are multiple certificates in play.

It seems it is possible to use multiple certificates on one Node.js server (probably via Express.js extension), but it is possible to combine it with a module like spdy , and if so how?

Instead of hacking nodes, would it be smarter to pawn the task of sorting http2 and SSL into nginx? Should a caching network like Imperva or Akamai handle this?

Farhad Farahi

Nginx handles SSL termination very well, which will offload the SSL processing power of the application server.

If you have a secure private network between nginx and your application server, I would recommend offloading ssl through an nginx reverse proxy. In this practice, nginx will listen on ssl (the certificate will be managed on the nginx server), and then forward proxy requests in reverse to the app server on non-ssl (so the app server doesn't need to have a certificate on it, No ssl configuration and no ssl process burden).

If you don't have a secure private network between your nginx and your application server, you can still use nginx as a reverse proxy by configuring the upstream to be ssl, but you'll lose the benefit of offloading.

CDNs can do the same. They are basically reverse proxy + cache so I don't see the problem there.

good looking .

Related


Express.js with multiple SSL certificates and HTTP/2

dsp_099 Scenes: I have an express.js server that serves variations of the same static login page based on req.headers.hostthe source the user says - like an A/B test. GET tulip.flower.comsupplypages/flower.com/tulip.html GET rose.flower.comsupplypages/flower.c

Express.js with multiple SSL certificates and HTTP/2

dsp_099 Scenes: I have an express.js server that serves variations of the same static login page based on req.headers.hostthe source the user says - like an A/B test. GET tulip.flower.comsupplypages/flower.com/tulip.html GET rose.flower.comsupplypages/flower.c

Express.js with multiple SSL certificates and HTTP/2

dsp_099 Scenes: I have an express.js server that serves variations of the same static login page based on req.headers.hostthe source the user says - like an A/B test. GET tulip.flower.comsupplypages/flower.com/tulip.html GET rose.flower.comsupplypages/flower.c

Express.js with multiple SSL certificates and HTTP/2

dsp_099 Scenes: I have an express.js server that serves variations of the same static login page based on req.headers.hostthe source the user says - like an A/B test. GET tulip.flower.comsupplypages/flower.com/tulip.html GET rose.flower.comsupplypages/flower.c

Traefik kubernetes multiple SSL certificates

Winner I am using Traefik as a reverse proxy on a Kubernetes cluster and am looking for a way to use multiple SSL certificates. According to the doc , it is not possible to use multiple TLSStores, I have to use only the defaultstore. For example, I have two do

WildFly Multiple Domains and SSL Certificates

kefkaz I have two different domains example1.com example2.com Each domain has its own SSL certificate. What I want to do now is use both domains for the same WildFly instance, with SSL support. The WildFly documentation states that I can only reference a singl

Multiple SSL certificates on one server

Kyle O'Brien We will host both websites on a small but dedicated production server. Both sites require SSL authentication. So we set up virtual hosts for both of them. They all reference their own domain.key, domain.crt and domain.intermediate.crt files. Each

Multiple SSL certificates on one server

Kyle O'Brien We will host both websites on a small but dedicated production server. Both sites require SSL authentication. So we set up virtual hosts for both of them. They all reference their own domain.key, domain.crt and domain.intermediate.crt files. Each

Traefik kubernetes multiple SSL certificates

Winner I am using Traefik as a reverse proxy on a Kubernetes cluster and am looking for a way to use multiple SSL certificates. According to the doc , it is not possible to use multiple TLSStores, I have to use only the defaultstore. For example, I have two do

WildFly Multiple Domains and SSL Certificates

kefkaz I have two different domains example1.com example2.com Each domain has its own SSL certificate. What I want to do now is use both domains for the same WildFly instance, with SSL support. The WildFly documentation states that I can only reference a singl

Multiple SSL certificates in virtual host?

alavona I have a server running Ubuntu 12.04.3 LTS and two servers running Ubuntu 14.04.1 LTS with SSL certificates in them. All are bitnami stacks, so their apache2 config files are at: /opt/bitnami/apache2/conf/bitnami The requirement is to www.have a total

Traefik kubernetes multiple SSL certificates

Winner I am using Traefik as a reverse proxy on a Kubernetes cluster and am looking for a way to use multiple SSL certificates. According to the doc , it is not possible to use multiple TLSStores, I have to use only the defaultstore. For example, I have two do

Traefik kubernetes multiple SSL certificates

Winner I am using Traefik as a reverse proxy on a Kubernetes cluster and am looking for a way to use multiple SSL certificates. According to the doc , it is not possible to use multiple TLSStores, I have to use only the defaultstore. For example, I have two do

Traefik kubernetes multiple SSL certificates

Winner I am using Traefik as a reverse proxy on a Kubernetes cluster and am looking for a way to use multiple SSL certificates. According to the doc , it is not possible to use multiple TLSStores, I have to use only the defaultstore. For example, I have two do

Multiple SSL certificates on one server

Kyle O'Brien We will host both websites on a small but dedicated production server. Both sites require SSL authentication. So we set up virtual hosts for both of them. They all reference their own domain.key, domain.crt and domain.intermediate.crt files. Each

WildFly Multiple Domains and SSL Certificates

kefkaz I have two different domains example1.com example2.com Each domain has its own SSL certificate. What I want to do now is use both domains for the same WildFly instance, with SSL support. The WildFly documentation states that I can only reference a singl

Multiple SSL certificates in virtual host?

alavona I have a server running Ubuntu 12.04.3 LTS and two servers running Ubuntu 14.04.1 LTS with SSL certificates in them. All are bitnami stacks, so their apache2 config files are at: /opt/bitnami/apache2/conf/bitnami The requirement is to www.have a total

2 twisted SSL certificates

calombo I have the following code: from twisted.web.server import Site from twisted.web.static import Data from twisted.internet import reactor, ssl root = Data("", "text/plain") site = Site(root) reactor.listenSSL(config.ws_port, site,

2 twisted SSL certificates

calombo I have the following code: from twisted.web.server import Site from twisted.web.static import Data from twisted.internet import reactor, ssl root = Data("", "text/plain") site = Site(root) reactor.listenSSL(config.ws_port, site,

2 twisted SSL certificates

calombo I have the following code: from twisted.web.server import Site from twisted.web.static import Data from twisted.internet import reactor, ssl root = Data("", "text/plain") site = Site(root) reactor.listenSSL(config.ws_port, site,

How to have multiple SSL certificates for Java server

Lawrence Dol: I have an internal HTTP server written in Java; the full source code is at my disposal. The HTTP server can be configured with any number of websites, each with a separate listening socket, which is created with the following command: skt=SSLServ