Home
Unix-Linux Administration
Database
Programming
Advanced Search
Resources
Contact Us
Home arrow Unix-Linux Administration arrow How to Install arrow Lighttpd PHP5 MySQL-vhost chroot jail installation under Ubuntu 7 Linux
Lighttpd PHP5 MySQL-vhost chroot jail installation under Ubuntu 7 Linux Print
Nov 08, 2007 at 10:59 AM

Security, speed, compliance, and flexibility -- all of these describe lighttpd (pron. lighty) which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems. And best of all it's Open Source licensed under the revised BSD license.

 

1. Install MySQL 5.0

apt-get install mysql-server-5.0 mysql-client-5.0

  change password root with command

 /etc/init.d/mysql reset-password 

2. Install Lighttpd and lighttpd-mod-mysql-vhost

apt-get install lighttpd lighttpd-doc lighttpd-mod-mysql-vhost

3. Install php5

apt-get install php5-cgi php5-mysql php5-gd php5-mhash php5-pspell
Note: You can list other extention with command apt-cache search php5

4. Config Lighttpd and php.ini
edit lighttpd.conf
vi /etc/lighttpd/lighttpd.conf
change
server.modules              = (
            "mod_access",
            "mod_alias",
            "mod_accesslog",
#           "mod_rewrite",

to
server.modules              = (
            "mod_access",
            "mod_alias",
            "mod_accesslog",
            "mod_fastcgi",
#           "mod_rewrite",

goto end of file and put

fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket"
)))

 

put  cgi.fix_pathinfo = 1 with command
echo "cgi.fix_pathinfo = 1" >>  /etc/php5/cgi/php.ini

 restart lighttpd with
/etc/init.d/lighttpd restart

5. Testing phpinfo
touch /var/www/phpinfo.php
echo "<? echo phpinfo(); ?>" >> /var/www/phpinfo.php

open  IE ,Firefox or any brower and open url eg. http://192.168.0.2/phpinfo.php