How to Setup Lighttpd, MYSQL and PHP5 on Debian Squeeze
This tutorial will show you how to quickly deploy a server running, lighttpd, mysql and php5.
Step 1: Installing lighttpd:
apt-get install lighttpd
Step 2: Installing MYSQL:
apt-get install mysql-server mysql-client
Step 3: Installing and configuring PHP5:
apt-get install php5-cgi php5-mysql
We will edit the php.ini file:
nano /etc/php5/cgi/php.ini
and find the line “cgi.fix_pathinfo=” (or add it) and append it as follows:
cgi.fix_pathinfo=1
Step 4: Configure Lighttpd (enable modules):
lighttpd-enable-mod fastcgi lighttpd-enable-mod fastcgi-php
and create the configuration file for PHP5:
cp /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/10-fastcgi.conf
and finally reload lighttpd:
/etc/init.d/lighttpd force-reload