Difference between revisions of "Lighttpd with mysql and php (LLMP)"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
(Setup vhost for 2 urls in lighttpd.conf)
(Setup vhost for 2 urls in lighttpd.conf)
Line 15: Line 15:
  
 
Add this too:
 
Add this too:
$HTTP["host"] =~ "(^|\.)myhost1\.homelinux\.com$" {
+
$HTTP["host"] =~ "(^|\.)myhost1\.homelinux\.com$" {
server.document-root = "/media/www/myhost1"
+
server.document-root = "/media/www/myhost1"
server.errorlog = "/var/log/lighttpd/myhost1/error.log"
+
server.errorlog = "/var/log/lighttpd/myhost1/error.log"
}
+
}
  
$HTTP["host"] =~ "(^|\.)myhost2\.hello\.com$" {
+
$HTTP["host"] =~ "(^|\.)myhost2\.hello\.com$" {
server.document-root = "/media/www/myhost2"
+
server.document-root = "/media/www/myhost2"
server.errorlog = "/var/log/lighttpd/myhost2/error.log"
+
server.errorlog = "/var/log/lighttpd/myhost2/error.log"
}
+
}
  
 
== Enable url mod_rewrite in lighttpd.conf ==
 
== Enable url mod_rewrite in lighttpd.conf ==

Revision as of 06:42, 2 September 2006


Contents

Lighttpd with php and mysql (LLMP)

LLMP instead of LAMP

apt-get install lighttpd php5-dev php5-cgi php5-sqlite php5-mysql mysql-client mysql-server 

Enable cgi and fast-cgi for php usage

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"
}

Enable url mod_rewrite in lighttpd.conf

Php

Plug and play ! Nothing to do !

Mysql

mysqladmin -u root password 'mypass'