lighttpd: Update SSL configs
[matthijs/servers/drsnuggles.git] / etc / lighttpd / ssl / README
1 # Don't forget to update the key in the mail vserver for dovecot as
2 # well!
3 #
4 # Generate key 2048 bit rsa key with out passphrase:
5
6 DOMAIN=mail.stdin.nl
7 sudo touch $DOMAIN.key
8 sudo chmod 400 $DOMAIN.key
9 sudo openssl genrsa  -out $DOMAIN.key 2048
10
11 # Generate CSR with:
12 sudo openssl req -new -key $DOMAIN.key -out $DOMAIN.csr
13
14 # After receiving the .crt file from the issuer, make sure you cat the .key
15 # and .crt file together into a .pem file, which lighttpd's ssl.pemfile points
16 # to. Don't forget to create the file with 400 first:
17 sudo touch $DOMAIN.pem
18 sudo chmod 400 $DOMAIN.pem
19 sudo sh -c "cat $DOMAIN.key $DOMAIN.crt > $DOMAIN.pem"
20 # Also create a full chain cert, which is used by dovecot
21 sudo sh -c "cat $DOMAIN.crt ca/startssl/all.pem > $DOMAIN.crt-chain"
22
23 # Optionally, you can use a config file to set attributes of the CSR (so you
24 # can leave out stuff like "Location" and "State"). However, when using
25 # StartSSL, al the details (including common name) from the CSR will be ignored
26 # anyway, so don't bother. Anyway, the file to pass to -config should like
27 # this:
28
29 [ req ]
30 distinguished_name     = req_distinguished_name
31 prompt=no
32
33 [ req_distinguished_name ]
34 C                      = NL
35 CN                     = mail.stdout.nl