10 :Date: $Date: 2004/08/29 09:44:53 $
11 :Revision: $Revision: 1.2 $
14 How to set up SSL in lighttpd
17 :keywords: lighttpd, ssl
19 .. contents:: Table of Contents
24 lighttpd supports SSLv2 and SSLv3 if it is compiled against openssl.
29 To enable SSL for the whole server you have to provide a valid
30 certificate and have to enable the SSL engine.::
33 ssl.pemfile = "/path/to/server.pem"
35 The HTTPS protocol does not allow you to use name-based virtual
36 hosting with SSL. If you want to run multiple SSL servers with
37 one lighttpd instance you must use IP-based virtual hosting: ::
39 $SERVER["socket"] == "10.0.0.1:443" {
41 ssl.pemfile = "www.example.org.pem"
42 server.name = "www.example.org"
44 server.document-root = "/www/servers/www.example.org/pages/"
47 If you have a .crt and a .key file, cat them together into a
51 $ cat host.key host.crt > host.pem
54 Self-Signed Certificates
55 ------------------------
57 A self-signed SSL certificate can be generated like this: ::
59 $ openssl req -new -x509 \
60 -keyout server.pem -out server.pem \