OpenSSL is required for installation.
1. Save your issued SSL certificate as domain_name.crt in simple text editor.
2. Move it to /etc/lighttpd/ssl/ server directory.
3. Do the same with your private key and save it as domain_name.key
4. Join the certificate with your key into one file domain_name.pem:
# cat domain_name.key domain_name.crt > domain_name.pem
5. Add 4 following lines into a conf file (usually /etc/lighttpd/lighttpd.conf):
1.2.3.4:443 - it is an IP address and SSL port,
ssl.engine - it is activation of SSL function,
ssl.pemfile - it is file with certificate and key,
ssl.ca-file - intermediate(s) certificate(s) of your CA.
$SERVER["socket"] == "1.2.3.4:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/domain_name.pem"
ssl.ca-file = "/etc/lighttpd/ssl/ca.crt"
}
6. Set the permission to the file:
# chown root:root /etc/lighttpd/ssl/domain_name.pem
# chmod 400 /etc/lighttpd/ssl/domain_name.pem
7. Restart your server. Certificate is ready to use.
In case of multi-domains security, you can protect it in 2 ways:
a) use individual IP address for every domain name - it changes with PEM file as the example:
$SERVER["socket"] == "IP1:443" {
ssl.pemfile = "/etc/lighttpd/ssl/www.domain_name1.pem"
}
$SERVER["socket"] == "IP2:443" {
ssl.pemfile = "/etc/lighttpd/ssl/domain_name2.pem"
}
etc.
b) install UC, SAN or Wildcard certificate.
cyber_Folks S.A. – Cookie settings
Do you like good cookies? We too! Some cookies are required for the website to function properly. Also accept additional cookies related to service performance, social networking and marketing. Cookies are also used to personalize ads. Thanks to them, you will get the best experience of our website, which we are constantly improving. The consent granted voluntarily may be withdrawn or modified at any time. More information about the cookies used can be found in our privacy policy. If you prefer to specify your preferences precisely - see the types of cookies below.