Backports einfügen
PHP Backports von dotdeb.org
deb http://php53.dotdeb.org stable all deb-src http://php53.dotdeb.org stable all
Lighty Backports von bits and pieces
deb http://www.jonmoniaci.com/debian-ppa/ lenny main contrib non-free
Installation
aptitude install lighttpd php5-cgi lighttpd-enable-mod fastcgi fastcgi-php
VHost einrichten
Wir legen jetzt eine neue Konfigurationsdatei für unseren VHost an.
touch /etc/lighty/available-mods/10-myvhost.conf
Die Datei bearbeiten wir jetzt mit einen beliebigen Editor
$HTTP["host"] == "myhost.example.com" { server.document-root = "/pfad/zur/ZF-Anwendung/public" url.rewrite-once = ( ".*\.(js|ico|gif|jpg|png|css)$" => "$0", ".*\?(.*)$" => "/index.php?$1", "" => "/index.php" ) setenv.add-environment = ( "APPLICATION_ENV" => "development" ) }
Nun muss die Konfiguration noch aktiviert werden
lighttpd-enable-mod myvhost
Module hinzufügen
Jetzt müssen der Datei “/etc/lighttpd/lighttpd.conf” noch 2 Module hinzugefügt werden
server.modules = ( #andere Module "mod_rewrite", "mod_setenv" )
Konfiguration neu laden
/etc/init.d/lighttpd force-reload
Nachdem die Konfiguration neu geladen wurde, sollte das Ganze wie gewünscht funktionieren.
Ein Gedanke zu „Howto: Debian 5 (Lenny) mit Lighttpd (Lighty) + PHP 5.3 + Zend Framework“