[doc] NEWS
[lighttpd.git] / doc / outdated / ssl.txt
blob447da4e520ce75f0965c60b082c37ed1652067ac
1 ===========
2 Secure HTTP
3 ===========
5 ------------
6 Module: core
7 ------------
9 :Author: Jan Kneschke
10 :Date: $Date: 2004/08/29 09:44:53 $
11 :Revision: $Revision: 1.2 $
13 :abstract:
14   How to set up SSL in lighttpd
16 .. meta::
17   :keywords: lighttpd, ssl
19 .. contents:: Table of Contents
21 Description
22 ===========
24 lighttpd supports SSLv2 and SSLv3 if it is compiled against openssl.
26 Configuration
27 -------------
29 To enable SSL for the whole server you have to provide a valid
30 certificate and have to enable the SSL engine.::
32   ssl.engine = "enable"
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" {
40     ssl.engine                  = "enable"
41     ssl.pemfile                 = "www.example.org.pem"
42     server.name                 = "www.example.org"
44     server.document-root        = "/www/servers/www.example.org/pages/"
45   }
47 If you have a .crt and a .key file, cat them together into a
48 single PEM file:
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 \
61     -days 365 -nodes