Light-weight web server Lighttpd

Introduction

Setup

Lighttpd

rpm -ql lighttpd

/srv/www/lighttpd/

/etc/rc.d/init.d/lighttpd start

/etc/lighttpd/lighttpd.conf

chkconfig --level 345 lighttpd on

http://www.osresources.com/5_11_en.html

http://www.experts-exchange.com/Web/Web_Languages/PHP/PHP_Installation/Q_21010686.html

To allow directory listing: dir-listing.activate = "enable"

PHP

Lighttpd uses the FastCGI version of PHP, not the usual CGI version. To check if you already have it, run either "php -v" or "php-cgi -v", and check that it says "(cgi-fcgi)". If not, here's the whole procedure to add PHP to Lighttp:

  1. Uninstall Apache: yum remove httpd
  2. wget http://dag.wieers.com/rpm/packages/lighttpd/lighttpd-fastcgi-1.4.18-1.el5.rf.i386.rpm
  3. rpm -Uvh ./lighttpd-fastcgi-1.4.18-1.el5.rf.i386.rpm
  4. Follow this to complete the setup: Lighttpd PHP fastcgi configuration

Note: Not sure it's necessary to add "cgi.fix_pathinfo=1" to /etc/php.ini, as it seems to be added by some package in /etc/php.d/lighttpd.ini.

Likewise, adding "extension=pdo.so" in php.ini doesn't seem necessary, since it can also be found in /etc/php.d/pdo.ini (installed by the php-pdo package.)

Resources