Lighttpd auf dem Raspberry Pi

Um auf dem Raspberry einen Webserver mit PHP Unterstützung laufen zu lassen, bin ich dem Tutorial von http://hobbyelektronik.org/w/index.php/Raspberry_Pi_IO gefolgt, bei mir hat es problemlos geklappt:

Schritt 1:


sudo groupadd www-data
sudo aptitude install lighttpd
sudo aptitude install php5-cgi
sudo lighty-enable-mod fastcgi
sudo adduser pi www-data

sudo chown -R www-data:www-data /var/www
sudo chmod -R 775 /var/www
sudo chmod g+w /var/www # siehe http://raspberrypi.stackexchange.com/questions/1182/how-to-write-to-files-in-var-www-after-installing-lighttpd

Schritt 2

In der /etc/lighttpd/lighttpd.conf folgendes hinzufügen:


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

Schritt 3


sudo /etc/init.d/lighttpd force-reload

In Midori oder von einem anderen Rechner aus sollt der Raspberry dann die Startseite ausgeben.

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website