A comprehensive guide to installing and configuring SSL certificates on Lighttpd web servers.
Before installing an SSL certificate on Lighttpd, ensure you have:
You can obtain an SSL certificate through several methods:
Follow these steps to install your SSL certificate:
sudo mkdir -p /etc/lighttpd/certs
sudo cp example.com.crt /etc/lighttpd/certs/
sudo cp example.com.key /etc/lighttpd/certs/
sudo cp chain.pem /etc/lighttpd/certs/
sudo chown -R www-data:www-data /etc/lighttpd/certs
sudo chmod 600 /etc/lighttpd/certs/*
Use our configuration generator to create your Lighttpd SSL configuration:
server.modules += ( "mod_ssl" )
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/example.com.pem"
ssl.ca-file = "/etc/lighttpd/certs/chain.pem"
# Modern SSL configuration
ssl.use-sslv3 = "disable"
ssl.use-compression = "disable"
ssl.honor-cipher-order = "enable"
ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
server.name = "example.com"
server.document-root = "/var/www/html"
}
Verify your SSL configuration:
sudo lighttpd -t -f /etc/lighttpd/lighttpd.conf
sudo systemctl restart lighttpd
Advanced SSL module features in Lighttpd:
# Example SNI Configuration
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/example.com.pem"
$HTTP["host"] == "example.com" {
ssl.pemfile = "/etc/lighttpd/certs/example.com.pem"
}
$HTTP["host"] == "subdomain.example.com" {
ssl.pemfile = "/etc/lighttpd/certs/subdomain.example.com.pem"
}
}
Certellix is an independent service. We are not affiliated with any commercial certificate authority.