~ubuntu-branches/ubuntu/edgy/lighttpd/edgy

« back to all changes in this revision

Viewing changes to doc/ssl.txt

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Krzyzaniak (eloy)
  • Date: 2006-01-16 20:06:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060116200639-0221dvlzvs5dxmgd
Tags: 1.4.9-1
* New upstream release
* Closing bug from not uploaded release 1.4.8-5, (closes: #347737)

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
:Revision: $Revision: 1.2 $
12
12
 
13
13
:abstract:
14
 
  How to setup SSL in lighttpd
15
 
  
 
14
  How to set up SSL in lighttpd
 
15
 
16
16
.. meta::
17
17
  :keywords: lighttpd, ssl
18
 
  
 
18
 
19
19
.. contents:: Table of Contents
20
20
 
21
21
Description
22
22
===========
23
23
 
24
 
lighttpd support SSLv2 and SSLv3 if it compiled against openssl.
 
24
lighttpd supports SSLv2 and SSLv3 if it is compiled against openssl.
25
25
 
26
26
Configuration
27
27
-------------
28
28
 
29
 
To enable SSL for the whole server you have to provide a valid 
 
29
To enable SSL for the whole server you have to provide a valid
30
30
certificate and have to enable the SSL engine.::
31
31
 
32
32
  ssl.engine = "enable"
33
33
  ssl.pemfile = "/path/to/server.pem"
34
 
  
35
 
As SSL and named-based virtual hosting can not work together you 
36
 
have to use IP-based virtual hosting if you want to run multiple
37
 
SSL-servers with one lighttpd: ::
 
34
 
 
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: ::
38
38
 
39
39
  $SERVER["socket"] == "10.0.0.1:443" {
40
40
    ssl.engine                  = "enable"
44
44
    server.document-root        = "/www/servers/www.example.org/pages/"
45
45
  }
46
46
 
47
 
If you have a .crt and a .key file cat them together into a single PEM file:
 
47
If you have a .crt and a .key file, cat them together into a
 
48
single PEM file:
48
49
::
49
50
 
50
51
  $ cat host.key host.crt > host.pem
53
54
Self-Signed Certificates
54
55
------------------------
55
56
 
56
 
A self-signed SSL cerifitcate can be generated with: :: 
57
 
  
 
57
A self-signed SSL certificate can be generated like this: ::
 
58
 
58
59
  $ openssl req -new -x509 \
59
60
    -keyout server.pem -out server.pem \
60
61
    -days 365 -nodes
61
 
    
 
62