lighttpd, php5, eAccelerator by RPMs

Install the require RPMs (php, php-mysql, php-eAccelerator). For Fedora, use yum (lighttpd and lighttpd-fastcgi). For CentOS and other distros that do not include lighttpd in their repository, use DAG repository

Find out the path to php-cgi and whether it supports fastcgi (should show cgi-fcgi)

Configure a light weight lighttpd:

Might need to switch from httpd to lighttpd

# switch from httpd to lighttpd
service httpd stop
service lighttpd start
chkconfig --list httpd
chkconfig lighttpd on
chkconfig httpd off
chkconfig --list httpd
chkconfig --list lighttpd

Can also run both httpd and lighttpd together on the same server (use two different ports, eg: 80 & 81, don’t forget to open the new port in the firewall) for testing/benchmarking or development purposes.

Initial benchmark: a 10-15% improvement on serving dynamic PHP/MySQL pages. Static files are supposed to be much faster. lighttpd is very stable (loadavg is maintained at about 3-4) with higher concurrency levels while Apache might increase loadavg to over 10+

Great kudos to the lighttpd developers for bringing us a fast, light webserver. Fly Light!

Comments (0)

› No comments yet.

Leave a Reply

Allowed Tags - You may use these HTML tags and attributes in your comment.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Pingbacks (0)

› No pingbacks yet.