0

I have SSL-sertificate for www. mydomain.com
How is the right config for nginx to get desired:

This doesn't work, broser shows SSL-warning (wrong domain) :(

server
{
        listen  443 ssl;
        server_name mydomain.com;
        rewrite ^(.*) https://www.mydomain.com$1 permanent;
        ssl_certificate      intermediate.crt;
        ssl_certificate_key  www.mydomain.com.key;
}

1 Answer 1

0

Since ssl handshake and certificate check occurs before any HTTP communication there is no way to make redirect without browser's warning.

1
  • Apart from getting another certificate for the second domain.
    – Ladadadada
    Nov 29, 2011 at 9:00

You must log in to answer this question.

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