diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2008-07-04 15:18:51 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2008-07-04 15:18:51 +0000 |
commit | 0f5d65be8b2b67a8a06529d5f3c7c091eadc7217 (patch) | |
tree | a01f47883dead4e9be2cc408c258ca9694c3d3ba | |
parent | e8a1c8874883cf6e0e9722691f73b6e7d14cbcd5 (diff) | |
download | ptxdist-0f5d65be8b2b67a8a06529d5f3c7c091eadc7217.tar.gz ptxdist-0f5d65be8b2b67a8a06529d5f3c7c091eadc7217.tar.xz |
* init.d/lighttpd, lighttpd/lighttpd.conf, lighttpd/mod_fastcgi.conf:
added
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@8600 33e552b5-05e3-0310-8538-816dae2090ed
-rwxr-xr-x | generic/etc/init.d/lighttpd | 44 | ||||
-rw-r--r-- | generic/etc/lighttpd/lighttpd.conf | 74 | ||||
-rw-r--r-- | generic/etc/lighttpd/mod_fastcgi.conf | 16 |
3 files changed, 134 insertions, 0 deletions
diff --git a/generic/etc/init.d/lighttpd b/generic/etc/init.d/lighttpd new file mode 100755 index 00000000..ef08fa13 --- /dev/null +++ b/generic/etc/init.d/lighttpd @@ -0,0 +1,44 @@ +#!/bin/sh + +# +# lighttpd +# +PATH=/usr/bin:/usr/sbin:/bin:/sbin + +PREFIX="lighttpd: " +LIGHTTPD="/usr/sbin/lighttpd" +LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf" + +case $1 in + + start) + echo "${PREFIX}starting" + + if [ \! -d /var/log/lighttpd ]; then + mkdir -p /var/log/lighttpd + chown www:www /var/log/lighttpd + fi + + if start-stop-daemon --start --quiet --oknodo --exec ${LIGHTTPD} -- -f ${LIGHTTPD_CONF}; then + echo "${PREFIX}done" + else + echo "${PREFIX}error, could not start server" + fi + ;; + + stop) + echo "${PREFIX}stoppping" + + if start-stop-daemon --stop --quiet --oknodo --exec ${LIGHTTPD}; then + echo "${PREFIX}done" + else + echo "${PREFIX}error, could not stop server" + fi + ;; + + *) + echo "${PREFIX}usage: ${0} [start|stop]" + exit 1 + ;; + +esac diff --git a/generic/etc/lighttpd/lighttpd.conf b/generic/etc/lighttpd/lighttpd.conf new file mode 100644 index 00000000..21d4b19b --- /dev/null +++ b/generic/etc/lighttpd/lighttpd.conf @@ -0,0 +1,74 @@ +server.document-root = "/var/www" + +server.port = 80 +server.username = "www" +server.groupname = "www" +server.bind = "0.0.0.0" +server.tag = "lighttpd" + +server.errorlog = "/var/log/lighttpd/error.log" +accesslog.filename = "/var/log/lighttpd/access.log" + +server.modules = ( + "mod_access", + "mod_accesslog", + "mod_fastcgi", + "mod_rewrite", + "mod_auth" +) + +# mimetype mapping +mimetype.assign = ( + ".pdf" => "application/pdf", + ".sig" => "application/pgp-signature", + ".spl" => "application/futuresplash", + ".class" => "application/octet-stream", + ".ps" => "application/postscript", + ".torrent" => "application/x-bittorrent", + ".dvi" => "application/x-dvi", + ".gz" => "application/x-gzip", + ".pac" => "application/x-ns-proxy-autoconfig", + ".swf" => "application/x-shockwave-flash", + ".tar.gz" => "application/x-tgz", + ".tgz" => "application/x-tgz", + ".tar" => "application/x-tar", + ".zip" => "application/zip", + ".mp3" => "audio/mpeg", + ".m3u" => "audio/x-mpegurl", + ".wma" => "audio/x-ms-wma", + ".wax" => "audio/x-ms-wax", + ".ogg" => "audio/x-wav", + ".wav" => "audio/x-wav", + ".gif" => "image/gif", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".png" => "image/png", + ".xbm" => "image/x-xbitmap", + ".xpm" => "image/x-xpixmap", + ".xwd" => "image/x-xwindowdump", + ".css" => "text/css", + ".html" => "text/html", + ".htm" => "text/html", + ".js" => "text/javascript", + ".asc" => "text/plain", + ".c" => "text/plain", + ".conf" => "text/plain", + ".text" => "text/plain", + ".txt" => "text/plain", + ".dtd" => "text/xml", + ".xml" => "text/xml", + ".mpeg" => "video/mpeg", + ".mpg" => "video/mpeg", + ".mov" => "video/quicktime", + ".qt" => "video/quicktime", + ".avi" => "video/x-msvideo", + ".asf" => "video/x-ms-asf", + ".asx" => "video/x-ms-asf", + ".wmv" => "video/x-ms-wmv", + ".bz2" => "application/x-bzip", + ".tbz" => "application/x-bzip-compressed-tar", + ".tar.bz2" => "application/x-bzip-compressed-tar" +) +index-file.names = ( "index.html", "index.php" ) + +include "mod_fastcgi.conf" diff --git a/generic/etc/lighttpd/mod_fastcgi.conf b/generic/etc/lighttpd/mod_fastcgi.conf new file mode 100644 index 00000000..99b599a3 --- /dev/null +++ b/generic/etc/lighttpd/mod_fastcgi.conf @@ -0,0 +1,16 @@ +fastcgi.map-extensions = ( ".html" => ".php" ) + +fastcgi.server = ( ".php" => + ( "localhost" => + ( + "socket" => "/tmp/php-fastcgi.socket", + "bin-path" => "/usr/bin/php5-cgi", + "min-procs" => 1, + "max-procs" => 2, + "max-load-per-proc" => 8, + "idle-timeout" => 50, + # Fix PATH_INFO for PHP scripts that rely on it (like Wordpress). + "broken-scriptfilename" => "enable" + ) + ) + ) |