# HG changeset patch # User Christophe Lincoln # Date 1197982274 -3600 # Node ID 8a16d292a7d3613d2b973531e7d8ea9a0ab44cf2 # Parent 8e5c96401d01741d248da8461d852efccc4ac3d3 Add : lighttpd Web server with stuff diff -r 8e5c96401d01 -r 8a16d292a7d3 libxml2-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxml2-dev/receipt Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,20 @@ +# SliTaz package receipt. + +PACKAGE="libxml2-dev" +VERSION="2.6.30" +CATEGORY="extra" +SHORT_DESC="XML C parser and toolkit devel files." +MAINTAINER="pankso@slitaz.org" +WANTED="libxml2" +WEB_SITE="http://xmlsoft.org/" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib $fs/usr/share + cp -a $_pkg/usr/lib/*.*a $fs/usr/lib + cp -a $_pkg/usr/lib/*.sh $fs/usr/lib + cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib + cp -a $_pkg/usr/include $fs/usr + cp -a $_pkg/usr/share/aclocal $fs/usr/share +} diff -r 8e5c96401d01 -r 8a16d292a7d3 libxml2/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxml2/receipt Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,35 @@ +# SliTaz package receipt. + +PACKAGE="libxml2" +VERSION="2.6.30" +CATEGORY="extra" +SHORT_DESC="Libxml2 is the XML C parser and toolkit." +MAINTAINER="pankso@slitaz.org" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://xmlsoft.org/" +WGET_URL="ftp://xmlsoft.org/libxml2/$TARBALL" + +# Rules to configure and make the package. +# +# Note: libxml2 can be build using option --with-minimum +# +compile_rules() +{ + cd $src + ./configure \ + --prefix=/usr --infodir=/usr/share/info \ + --mandir=/usr/share/man --with-html-dir=/usr/share/doc + $CONFIGURE_ARGS + make + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib + cp -a $_pkg/usr/bin $fs/usr + strip -s $fs/usr/lib/* + strip -s $fs/usr/bin/* 2>/dev/null +} diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd-modules/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lighttpd-modules/receipt Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,38 @@ +# SliTaz package receipt. + +PACKAGE="lighttpd-modules" +VERSION="1.4.18" +CATEGORY="extra" +SHORT_DESC="Complementary modules for LightTPD Web server." +MAINTAINER="pankso@slitaz.org" +DEPENDS="lighttpd" +WANTED="lighttpd" +WEB_SITE="http://www.lighttpd.net/" +BASE_MODULES=" +access +accesslog +alias +cgi +fastcgi +compress +dirlisting +indexfile +staticfile +rewrite +status +userdir" + +# Rules to gen a SliTaz package suitable for Tazpkg. +# On SliTaz Lighttpd runs as user/group : www/www or 80/80. +genpkg_rules() +{ + # Modules. + mkdir -p $fs/usr/ + cp -a $_pkg/usr/lib $fs/usr + for module in $BASE_MODULES + do + rm -f $fs/usr/lib/lighttpd/mod_${module}.so + done + rm -f $fs/usr/lib/lighttpd/*.la + strip -s $fs/usr/lib/lighttpd/* +} diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lighttpd/receipt Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,80 @@ +# SliTaz package receipt. + +PACKAGE="lighttpd" +VERSION="1.4.18" +CATEGORY="base-apps" +SHORT_DESC="Fast and light HTTP Web server." +MAINTAINER="pankso@slitaz.org" +DEPENDS="php" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WEB_SITE="http://www.lighttpd.net/" +WGET_URL="http://www.lighttpd.net/download/$TARBALL" +BASE_MODULES=" +access +accesslog +alias +cgi +fastcgi +compress +dirlisting +indexfile +staticfile +rewrite +status +userdir" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure -enable-shared --disable-ipv6 --prefix=/usr \ + --libdir=/usr/lib/lighttpd --mandir=/usr/share/man \ + $CONFIGURE_ARGS + make + make DESTDIR=$PWD/_pkg install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +# On SliTaz Lighttpd runs as user/group : www/www or 80/80. +genpkg_rules() +{ + mkdir -p $fs/usr + cp -a $_pkg/usr/bin $fs/usr + cp -a $_pkg/usr/sbin $fs/usr + + # Modules. + mkdir -p $fs/usr/lib/lighttpd + for module in $BASE_MODULES + do + cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd + echo -n "Copying : mod_${module}.so" && status + done + strip -s $fs/usr/bin/* + strip -s $fs/usr/sbin/* + strip -s $fs/usr/lib/lighttpd/* + + # Server root and config file. + cp -a stuff/var $fs + cp -a stuff/etc $fs + + # Logs directory. + mkdir -p $fs/var/log/lighttpd + chown 80.80 $fs/var/log/lighttpd +} + +# Pre and post install commands for Tazpkg. +# We stop the server by default in case of upgarde. +pre_install() +{ + echo "Processing pre-install commands..." + /etc/init.d/$PACKAGE stop +} +post_install() +{ + local root + root=$1 + echo "Processing post-install commands..." + # Just in case. + chown www.www $root/var/log/$PACKAGE + /etc/init.d/$PACKAGE start +} diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/stuff/etc/init.d/lighttpd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lighttpd/stuff/etc/init.d/lighttpd Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,55 @@ +#!/bin/sh +# /etc/init.d/lighttpd: Start, stop and restart web server on SliTaz, +# at boot time or with the command line. Daemons options are configured +# with /etc/daemons.conf +# +. /etc/init.d/rc.functions +. /etc/daemons.conf + +NAME=LightTPD +DESC="web server" +DAEMON=/usr/sbin/lighttpd +OPTIONS=$LIGHTTPD_OPTIONS +PIDFILE=/var/run/lighttpd.pid + +case "$1" in + start) + if [ -f $PIDFILE ] ; then + echo "$NAME already running." + exit 1 + fi + echo -n "Starting $DESC: $NAME... " + $DAEMON $OPTIONS + status + ;; + stop) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Stopping $DESC: $NAME... " + kill `cat $PIDFILE` + rm $PIDFILE + status + ;; + restart) + if [ ! -f $PIDFILE ] ; then + echo "$NAME is not running." + exit 1 + fi + echo -n "Restarting $DESC: $NAME... " + kill `cat $PIDFILE` + rm $PIDFILE + sleep 2 + $DAEMON $OPTIONS + status + ;; + *) + echo "" + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" + echo "" + exit 1 + ;; +esac + +exit 0 diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/stuff/etc/lighttpd/lighttpd.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lighttpd/stuff/etc/lighttpd/lighttpd.conf Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,157 @@ +# /etc/lighttpd/lighttpd.conf: SliTaz LightTPD +# Web server configuration file. +# Configuration du serveur web. +# +# Documentation : /usr/share/doc/slitaz/handbook/web-server.html +# http://trac.lighttpd.net/trac/wiki#Documentation +# +# + +# Root documents. +# +server.document-root = "/var/www/" + +# Port, default for HTTP traffic is 80. +# +server.port = 80 + +# Server, user and group name. +# +server.username = "www" +server.groupname = "www" + +# Server header. +# Be nice and keep it at lighttpd and SliTaz GNU/Linux. +# +server.tag = "lighttpd/1.4.18 (SliTaz GNU/Linux)" + +# Directory listings. +# +dir-listing.activate = "enable" +dir-listing.encoding = "iso8859-1" + +# File to open by default. +# +index-file.names = ( "index.html","index.php", "index.cgi", "index.sh" ) + +# Log messages. +# +accesslog.filename = "/var/log/lighttpd/access.log" +server.errorlog = "/var/log/lighttpd/error.log" + +# Server pid file +server.pid-file = "/var/run/lighttpd.pid" + +# MIME type. +# +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain", + ".js" => "text/javascript", + ".css" => "text/css", + ".xml" => "text/xml", + ".diff" => "text/plain", + ".patch" => "text/plain", + ".list" => "text/plain", + ".log" => "text/plain", + ".conf" => "text/plain", + ".pdf" => "application/pdf", + ".ps" => "application/postscript", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".png" => "image/png", + ".gif" => "image/gif", + ".xbm" => "image/x-xbitmap", + ".xpm" => "image/x-xpixmap", + ".gz" => "application/x-gzip", + ".tar.gz" => "application/x-tgz", + ".torrent" => "application/x-bittorrent", + ".ogg" => "application/ogg", + ".cooklist" => "text/plain", + ".tazpkg" => "application/x-tazpkg", + "README" => "text/plain", + "receipt" => "text/plain", +) + +# Deny access the file-extensions. +# +url.access-deny = ( "~", ".inc" ) + +# Modules to load. +# See /usr/lib/lighttpd for all available modules. +# +server.modules = ( + "mod_access", + "mod_accesslog", + "mod_alias", + "mod_cgi", + "mod_compress", + "mod_rewrite", + "mod_status", + "mod_userdir", + "mod_fastcgi", +) + +# User directory module. +# +userdir.path = "Public" +userdir.exclude-user = ("root") + +# Status module. +# +status.status-url = "/server-status" + +# Compress module +# +#compress.cache-dir = "/var/cache/lighttpd/compress/" +#compress.filetype = ("text/plain", "text/html") + +## CGI module. You can install Perl and assign .pl and .cgi script +# to /usr/bin/perl. +# +$HTTP["url"] =~ "/cgi-bin/" { + cgi.assign = ( + ".sh" => "/bin/sh" + ) +} + +# Fast CGI modules for PHP. +# +fastcgi.server = ( ".php" => (( + "bin-path" => "/usr/bin/php-cgi", + "socket" => "/tmp/php.socket" + ))) + +# Alias urls for localhost (doc, examples and PHP info). +# +$HTTP["remoteip"] =~ "127.0.0.1" { + alias.url += ( + "/doc/" => "/usr/share/doc/", + "/examples/" => "/usr/share/examples/", + "/phpinfo/" => "/usr/share/phpinfo/" + ) +} + +## Virtual hosts. +# +# If you want name-based virtual hosting load mod_simple_vhost. +# +# You can directly put vhost in this file or use a sepate one for all +# virtual hosting. +# +include "vhosts.conf" + +# Example.org +# +#$HTTP["host"] =~ "(^|\.)example\.org$" { + #server.document-root = "/var/www/vhost/exemple.com/html" + #server.errorlog = "/var/log/lighttpd/example.org-error.log" + #accesslog.filename = "/var/log/lighttpd/example.org-access.log" +#} + +# Deny access for all image stealers (anti-hotlinking for images) +# +#$HTTP["referer"] !~ "^($|http://www\.example\.org)" { +# url.access-deny = ( ".jpg", ".jpeg", ".png" ) +#} + diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/stuff/etc/lighttpd/vhosts.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lighttpd/stuff/etc/lighttpd/vhosts.conf Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,10 @@ +# /etc/lighttpd/vhosts.conf : Virtual hosts configuration file. +# + +# Example.org +# +#$HTTP["host"] =~ "(^|\.)example\.org$" { + #server.document-root = "/var/www/vhost/exemple.com/html" + #server.errorlog = "/var/log/lighttpd/example.org-error.log" + #accesslog.filename = "/var/log/lighttpd/example.org-access.log" +#} diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/stuff/var/www/images/header.png Binary file lighttpd/stuff/var/www/images/header.png has changed diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/stuff/var/www/images/lighttpd-80x27.png Binary file lighttpd/stuff/var/www/images/lighttpd-80x27.png has changed diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/stuff/var/www/images/slitaz-80x15.png Binary file lighttpd/stuff/var/www/images/slitaz-80x15.png has changed diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/stuff/var/www/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lighttpd/stuff/var/www/index.html Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,83 @@ + + + + SliTaz - LightTPD Web server + + + + + + + + + + + + + +
+

Index of /

+

Français

+

+Bienvenue sur la page d'index de ce serveur libre LightTPD, propulsé +par un système d'exploitation SliTaz GNU/Linux. Vous pouvez supprimer +cette page, la modifier, ou mettre vos propres pages xHTML, sites et/ou +scripts CGI ou PHP. +

+

+Le fichier de configuration est /etc/lighttpd/lighttpd.conf, +il est autodocumenté. Une page du +Handbook +de SliTaz, en français, est dédiée à la configuration du serveur web, et la +documentation officiel, en anglais, ce trouve sur + +http://trac.lighttpd.net/trac/wiki#Documentation +

+

English

+

+Welcome to free LightTPD web server index page, powered by SliTaz +GNU/Linux operating system. You can delet or modify this page to put +your own xHTML pages, web sites, CGI or PHP scripts. +

+

+Configuration file can be found in /etc/lighttpd/lighttpd.conf +and official documentation at http://trac.lighttpd.net/trac/wiki#Documentation. +

+ + +
+
+ + + + diff -r 8e5c96401d01 -r 8a16d292a7d3 lighttpd/stuff/var/www/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lighttpd/stuff/var/www/style.css Tue Dec 18 13:51:14 2007 +0100 @@ -0,0 +1,57 @@ +/* CSS style for SliTaz GNU/Linux generic xHTML files. */ +body { + font: 90% sans-serif, vernada, arial; + margin: 0; + } +/* Header */ +#header{ + background: #f0ba08 url(images/header.png) repeat-x top; + color: black; + width: 100%; + height: 50px ; + border-top: 1px solid black; + border-bottom: 1px solid black; + } +#content { + margin: 0px 50px 26px 50px; + } +#footer { + border-top: 1px solid black; + } +a { + text-decoration: underline; + } +a:hover { + text-decoration: none; + } +h1 { + margin: 10px 0px 0px 6px; + } +h2 { + margin: 12px 0; + } +pre { + padding: 5px; + color: black; + background: #e1e0b0; + } +pre.script { + padding: 10px; + color: black; + background: #e8e8e8; + border: 1px inset #333333; +} +li { + line-height: 1.4em; + } +code { + font-size: 100%; + color: #669900; + background: transparent; + } +hr { + color: white; + background-color: white; + height: 1px; + border: 0; + }