Webserver lighttpd auf dem Zaurus

03 07 2005

Gute Nachrichten! Der sichere, schnelle und leichtgewichtige Webserver lighttpd läuft auch auf dem Sharp Zaurus SL-C860. Der SL-C860 ist ein eingebettetes ARM-basiertes Intel XScale PXA255 Gerät. Als OS ist auf meinem Zaurus zur Zeit pdaXrom in Gebrauch. Lighty wurde auf einer x86-Machine cross-kompiliert und dann als Itsy-Paket (.ipk) für pdaXrom bereitgestellt. Er sollte auf allen Zaurus der Serie SL-Cxx0 laufen, aber das kann ich mangels Testmöglichkeit nicht garantieren.

Leider sind die Module mod_rewrite, mod_redirect und mod_ssi durch die wegen der Cross-Übersetzung fehlende Einbindung der pcre-library noch nicht verfügbar. Auf das Modul mod_mysql_vhost wurde außerdem bewußt verzichtet, da MySQL-Datenbank basierende virtuelle Hosts auf einem so resourcenbeschränktem Gerät wie dem Zaurus nicht wirklich viel Sinn ergeben.

Zur Zeit gibt es noch einige Probleme bei der nativen Übersetzung der Quellen, aber ich schaue mir das an. Als nächstes wird getestet. Nutzer von pdaXrom sollten bedenken, daß die lighttpd-Logdateien vorgabemäßig in das Verzeichnis /var/log/lighttpd/ geschrieben werden, das sich auf einer der beiden internen Flash-Partitionen (root) befindet. Bei intensiver Nutzung des Webservers sollte man darüber nachdenken, die Logs ins RAM zu verlegen, um einer vorzeitigen Abnutzung des internen Flash-Speichers vorzubeugen.

Die Document Root liegt in /var/www/, und der Server läuft unter der Nutzerkennung nobody. Das Initskript ist als /etc/rc.d/init.d/lighttpd zu finden. Für pdaXrom habe ich einen IPKG-Feed aufgesetzt, über den das lighttpd-Paket bezogen werden kann. Motivation war übrigens die Größes des Apache2-Paketes im pdaXrom-Feed, das um die 2,8 MB benötigt.

[See English translation below]

Web server lighttpd on the Zaurus

Good news! The secure, fast and lightweight web server lighttpd runs on the Sharp Zaurus SL-C860, too. The SL-C860 is an embedded ARM-based Intel XScale PXA255 device. On my Zaurus pdaXrom is currently in use as OS. Lighty has been cross-compiled on an x86 machine and then provided as an Itsy package (.ipk) for pdaXrom. It should run on all Zaurus of the SL-Cxx0 series, but due to the lack of a testing possibility this is no guarantee.

Unfortunately the modules mod_rewrite, mod_redirect and mod_ssi are currently unavailable due to the missing linking of the pcre library caused by the cross-compilation. The module mod_mysql_vhost has been deliberately set aside, because MySQL database based virtual hosting does not really make much sense on a resource restricted device such as the Zaurus.

There is some trouble with the native compilation of the sources at the moment, but I am looking into it. Next is testing. Users of pdaXrom should be aware that the lighttpd log files are written to /var/log/lighttpd/ per default, which is on one of the two internal flash partitions (root). If you are going to use the web server intensively, you should consider relocating the logs to RAM to prevent premature wear and tear of the internal flash memory.

The document root is in /var/www/ and the server runs as user nobody. The init script can be found as /etc/rc.d/init.d/lighttpd. I have set up an IPKG feed for pdaXrom from where the lighttpd package can be downloaded. Motivation was the size of the Apache2 package in the pdaXrom feed by the way, which needs around 2.8 MB.


Trackbacks


05 07 2005
Webserver lighttpd auf dem Zaurus
Gute Nachrichten! Der sichere, schnelle und leichtgewichtige Webserver lighttpd läuft auch auf dem Sharp Zaurus SL-C860. Der SL-C860 ist ein eingebettetes ARM-basiertes Intel XScale PXA255 Gerät. Als OS ist auf meinem Zaurus zur Zeit pdaXrom in Gebrauch.
Weblog: Sil53r Surf3r
Aufgenommen: Jul 05, 00:43
05 07 2005
Nativ kompilierter lighttpd für den Zaurus
Das lighttpd-Paket im IPKG-Feed ist jetzt nativ kompiliert. Bis auf das Modul mod_mysql_vhost steht damit nun die volle Funktionalität von lighttpd für den Zaurus zur Verfügung. Fehler bitte melden. Natively compiled lighttpd for the Zaurus The ligh
Weblog: Sil53r Surf3r
Aufgenommen: Jul 05, 20:40

Kommentare

Ansicht der Kommentare: (Linear | Verschachtelt)
11 06 2006
#1 Chris Peachment (Antwort)

*I want to cross-compile lighttpd for the
GP2X (www.gp2x.com), a personal
entertainment player like the Sony PSP,
but using ARM-Linux. Can you provide any
information about the cross-compile
process from Windows or Linux86?

Thanks.
12 06 2006
#1.1 Sil53r Surf3r (Antwort)

*I am aware of the GP2X and intend to buy one myself after my holiday in July. Cross-Compilation of lighttpd on Linux86 platforms should be easy; just set up the usual cross-compilation environment with the official SDK (http://dev.gp2x.com/forum/viewtopic.php?p=479) as you would need for any other application. I would expect lighttpd itself to compile without any hassle. But if the same applies to all of the modules, I cannot say at the moment. I will keep you informed about anything I learn as to that.
18 10 2006
#2 AndreasK (Antwort)

*Hallo,
wie würde es denn mit php anbindung aussehen. Ist dies möglich, die binaries von php in lighttpd mit einzubinden. Nutzte bereits die 5.1er binaries von php für pdaxrom.
Super Leistung schon mal, einen schmalen Webserver für den Zaurus zu kompilieren.

Danke schon mal im Vorraus.

Grüße
Andreas
18 10 2006
#2.1 Sil53r Surf3r (Antwort)

*Die PHP-Anbindung erfolgt mittels FastCGI; siehe http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI. Prinzipiell ist das auch auf den Zauri möglich, ja. Beachte dabei bitte, daß es sich bei der hier im Feed befindlichen um eine sehr alte Version von lighttpd handelt. Nach meinem Umzug will ich die dann aktuelle zusammen mit den OpenEmbedded-Versionen für Zaurus, WGT634U, NSLU, GP2X und Nokia 770 in Feeds bereitstellen, soweit dies sinnvoll ist. Das kann allerdings noch einige Wochen dauern.

Kommentar schreiben


Die angegebene E-Mail-Adresse wird nicht dargestellt, sondern nur für eventuelle Benachrichtigungen verwendet.

Um maschinelle und automatische Übertragung von Spamkommentaren zu verhindern, bitte die Zeichenfolge im dargestellten Bild in der Eingabemaske eintragen. Nur wenn die Zeichenfolge richtig eingegeben wurde, kann der Kommentar angenommen werden. Bitte beachten Sie, dass Ihr Browser Cookies unterstützen muss um dieses Verfahren anzuwenden.
CAPTCHA

Umschließende Sterne heben ein Wort hervor (*wort*), per _wort_ kann ein Wort unterstrichen werden.
Gravatar/Pavatar/Favatar/Pavatar Autoren Bilder werden unterstützt.