Difference between revisions of "Lighttpd with Sqlite and Php (LLSP)"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
'''[[w:LAMP (software bundle)|LAMP]]''' (or '''L.A.M.P.''') refers to a set of [[w:free software|free software]] programs commonly used together to run dynamic [[w:Web site|Web site]]s or [[w:Server (computing)|server]]s:
 
*[[w:Linux|'''L'''inux]], the [[w:operating system|operating system]];
 
*[[w:Apache HTTP Server|'''A'''pache]], the [[w:Web server|Web server]];
 
*[[w:MySQL|'''M'''ySQL]], the [[w:DBMS|database management system]] (or database server);
 
*[[w:PHP|'''P'''HP]], [[w:Perl|'''P'''erl]], [[w:Python programming language|'''P'''ython]], and/or [[w:Mono (software)|'''P'''rimate]] (mod mono),  [[w:scripting language|scripting/programming language]]s.
 
 
 
 
 
   
 
   
 
{{Articles|Debian|}}
 
{{Articles|Debian|}}

Revision as of 14:15, 4 December 2006


Contents

Lighttpd with SQLite and php (LLSP)

LLSP instead of LAMP (Apache w/ PHP and MySQL Support (MIPSel), Apache HTTP server, installing)

 apt-get install lighttpd php5-cgi php5-sqlite


Configure lighttpd to use PHP5-cgi

pico /etc/lighttpd/conf-available/10-fastcgi.conf

change

               "bin-path" => "/usr/bin/php4-cgi",

to

               "bin-path" => "/usr/bin/php5-cgi",

Enable cgi and fast-cgi for php usage

cd /etc/lighttpd/conf-enabled
ln -s ../conf-available/10-cgi.conf 10-cgi.conf
ln -s ../conf-available/10-fastcgi.conf 10-fastcgi.conf

Setup vhost for 2 urls in lighttpd.conf

Default location:

server.document-root "/media/www/"

Add this too:

$HTTP["host"] =~ "(^|\.)myhost1\.homelinux\.com$" {
server.document-root = "/media/www/myhost1"
server.errorlog = "/var/log/lighttpd/myhost1/error.log"
}
$HTTP["host"] =~ "(^|\.)myhost2\.hello\.com$" {
server.document-root = "/media/www/myhost2"
server.errorlog = "/var/log/lighttpd/myhost2/error.log"
}


I believe Lighttpd needs to be run as root the first time it is run - so

pico /etc/lighttpd/lighttpd.conf

uncomment the lines to read:

server.username            = "www-data"

and

server.groupname           = "www-data"

restart the webserver

/etc/init.d/lighttpd restart