Using ssl with multiple domains in snap-server

25 views
Skip to first unread message

Henry Laxen

unread,
Dec 28, 2018, 11:36:27 AM12/28/18
to Snap Framework
Dear Gregory & co,

First, thank you for all the wonderful work you have been doing on the
snapframework.  I have a situation where I need some sage advice.
Here is the environment:

I am using snap-server to host several different domains.  I have 3
dns domains all pointing to the same IP address.

Ex:
nadineloveshenry.com ->  64.251.15.192
ladron.mx            ->  64.251.15.192
christines.mx        ->  64.251.15.192

depending on the value of rqHostName, the code decides what pages to
serve.  This works great with http.

Now here is my question:  Is there any way to do this with https?  I
have a certificate for nadineloveshenry.com, and https works fine with
that, but when I try to go to ladron or christines, I get the "your
connection is not secure" screen with:

ladron.mx uses an invalid security certificate.
The certificate is only valid for nadineloveshenry.com.
Error code: SSL_ERROR_BAD_CERT_DOMAIN

I can see that the setSSLCert and setSSLKey functions only take
Strings (FilePath), not lists, so I can't have more than one cert per
server.  Can you suggest a way to get around this?  Any pointers will
be greatly appreciated.

Best wishes,
Henry Laxen

Gregory Collins

unread,
Feb 11, 2019, 2:27:26 PM2/11/19
to snap_fr...@googlegroups.com
Hi,

You need an HTTPS frontend with support for server name indication (SNI). By itself snap doesn't support this, you'll need to put it behind a reverse proxy (like nginx).  

--

---
You received this message because you are subscribed to the Google Groups "Snap Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snap_framewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Gregory Collins <gr...@gregorycollins.net>
Reply all
Reply to author
Forward
0 new messages