2

Is it possible to set up Nginx in such way, that on the same domain it will serve on two different ports, two different valid certificates both with HSTS?

Certificates are from different CA and for different applications. I would prefer to avoid moving one to a subdomain.

Is it possible?

  • If yes - how?
  • If no - why?

1 Answer 1

2

Yes. It works fine. Just add listen <port> ssl and the certificates to each server stanza:

server {
    listen          443 ssl;
    server_name     www.example.com;
    ssl_certificate www.example.com.crt;
    ...
}

server {
    listen          444  ssl;
    server_name     www.example.com;
    ssl_certificate www.example.com2.crt;
    ...
}

HSTS shouldn't cause problems but certificate pinning might.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .