Ssl – set multiple SSL certificates for virtual hosts with Lighttpd

lighttpdssl

Can I set multiple SSL certificates for virtual hosts using Lighttpd web server?

I have several webshops on my server (each webshop has its own domain) and I need to setup a SSL certificate for each of them.

thanks
Patrick

Best Answer

Please look at Lighttpd SNI, Server Name Indication is supported by Lighttpd since 1.4.24, which will allow more than one vhost per ip for SSL as pointed out by jae. Browser support is limited though including IE on XP.

Old answer: You can only setup one SSL certificate per ip/port pair that you use. If you have one IP address and multiple virtual hosts on the same ip address it will not work except if you get a SAN certificate with all the virtual host/domain contained in the SAN certificate. This will get expensive.

The reason for this limitation is that the web server needs to decrypt the SSL request to see which host the client is trying to access. This will be done using the SSL cert bound to that port. The client will then get a different certificate which will not match the host/domain the client is expecting.

This will cause all sorts of security warnings on the client side.

Related Topic