poniedziałek, 14 stycznia 2008

my fight with lighttpd at PLD Linux

Configuration of apache was easy (maybe because of the fact I made it many times), but apache is big like an elephant. I just want to serve dir indexes, so i didn't need apache :). I tried to install lighttpd... and so the story goes:

Installation environment:
PLD AC 2.0 with ac, ac-updated, ac-supported and ac-ready packages

Lighttpd (today latest dist version is 1.4.18-8)

in poldek paste:
install lighttpd

and press enter

lighttpd in PLD has some dependencies which are installed with main package:
lighttpd-mod_dirlisting - generates HTML based directory listings with full CSS support
lighttpd-mod_indexfile - module for choosing index files
lighttpd-mod_staticfile - module for static file serving
webapps - is a package for having web applications configuration files and webserver config fragments in unified place

and it's all...
/sbin/service lighttpd start

and you can check:

ok, but we need some more functions

first let's check what we can muff :)

open in your favorite editor this file

some description:
server.tag = "lighttpd super server"

you can change your server introduce


server.port = 80

if you want your server to use non standard port - change this option

really cool and standard option is trafic shaping :) (starting with version 1.3.8)
connection.kbytes-per-second = xy

limits the throughput for each single connection to the given limit in kbyte/s

server.kbytes-per-second = xx

limits the throughput for all connections

ok... maybe we need an ssl...
lighttpd supports SSLv2 and SSLv3, so the only thing we have to do is:
poldek -i lighttpd-ssl

make a self-signed certificate:
openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes

and move it to the default lighttpd place
mv server.pem /etc/lighttpd/

to finish installation just restart the lighttpd

0 komentarze: