Certificate issue on two IP-addresses with same port

I need to run two web applications (Ruby on Rails)
on one server over SSL. Both applications shall run on port 443 (other
wise we get firewall problems).

What I did:

  • I got two IP-addresses (85.214.47.37, 85.214.56.139) for the server.
  • I connected different domains to that addresses (gedis-intern.de
    85.214.47.37, gedis-second.de → 85.214.56.139
  • I configured two vhosts for nginx to listen on
  • I provided certificates for the two vhosts (ssl_certificate,
    ssl_certificate_key)

When I connect to the second application
(https://secure.ticket-db.gedis-second.de), then the wrong certificate
is presented (that of the first one) to the client. Therefore the
browser displays a warning, which confuses the user. (That is the
problem
)

If I set port 444 for the second application, than everything works
fine. But - as I said - port 444 is sometimes blocked by firewalls.

Any help is appreciated!

Thanks,
Martin


Martin Schoettler

Herzogstandweg 21
D-82431 Kochel am See

fon +49-(0) 88 51 - 92 31 54
fax +49-(0) 88 51 - 92 31 56
gsm +49-(0) 163 - 44 33 621

private +49-(0) 8851 - 7581

Skype: martin.schoettler

On Wed, 2008-02-20 at 11:29 +0100, Martin Schöttler wrote:

You have to configure the address, otherwise they will both try to
connect to all interfaces:

server {
server_name gedis-intern.de;
listen 85.214.47.37:443;
# …
}

server {
server_name gedis-second.de;
listen 85.214.56.139:443;
# …
}

Regards,
Cliff

Thank you Cliff. That did it!

   listen 85.214.47.37:443;

   listen 85.214.56.139:443;

Best regards
Martin


Martin Schoettler

Herzogstandweg 21
D-82431 Kochel am See

fon +49-(0) 88 51 - 92 31 54
fax +49-(0) 88 51 - 92 31 56
gsm +49-(0) 163 - 44 33 621

private +49-(0) 8851 - 7581

Skype: martin.schoettler