Project

General

Profile

HowToSimpleSSL » History » Revision 7

Revision 6 (Anonymous, 2006-07-26 14:06) → Revision 7/40 (Anonymous, 2007-02-12 04:44)

== Setting up a simple SSL configuration == 

 Setting up a simple SSL configuration with Lighttpd is quite easy. Though this method should be used with care because this setup will only provide proper encryption, not authentication! The user will be presented with a query whether to accept the certificate or not! 

 First, go into the SSL Certs directory and do: 
 {{{ 
 cd /etc/ssl/certs 
 openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes 
 chown www-data:www-data lighttpd.pem 
 chmod 600 lighttpd.pem 
 }}} 
 Please mind the fact that not every operating system uses www-data to runs it's webserver (lighttpd), so this may vary. 

 Then edit /etc/lighttpd/lighttpd.conf and add: 
 {{{ 
 $SERVER["socket"] == ":443" { 
   ssl.engine = "enable" 
   ssl.pemfile = "/etc/ssl/certs/lighttpd.pem" 
 } 
 }}} 

 After restarting the webserver this you should be able to access your webserver through https.