Install Ssl On Lighttpd

Lighttpd SSL Certificate Installation

Lighttpd Server SSL Certificate Installation

  1. 1. Copy the Certificate files to your server.Download your Intermediate (intermediate.crt) and Primary Certificates (your_domain_name.crt) from CA, then copy them to the directory on your server where you will keep your certificate and key files. Make them readable by root only.
  2. Concatenate the certificate and key file.

    You need to concatenate the key file and the certificate file into a single pem file by running the following command:cat your_domain_name.key your_domain_name.crt > your_domain_name.pem
  3. Edit the Lighttpd configuration fileNow open your lighttpd.conf file and add the following:

    var.confdir = "/etc/lighttpd"
    $SERVER["socket"] == "15.15.15.15:443" {
    ssl.engine = "enable"
    ssl.pemfile = var.confdir + "/your_domain_name.pem"
    ssl.ca-file = var.confdir + "/intermediate.crt"
    server.name = "your.domain.com"
    server.document-root = "/my/document/root/"
    }

    Make sure that the var.confdir (/etc/lighttpd) matches the location where you saved your certificate files. Also change the IP address (15.15.15.15) to match your IP address.

  4. Restart Lighttpd.