summaryrefslogtreecommitdiff
path: root/openwrt/package/lighttpd/files/lighttpd.conf
diff options
context:
space:
mode:
Diffstat (limited to 'openwrt/package/lighttpd/files/lighttpd.conf')
-rw-r--r--openwrt/package/lighttpd/files/lighttpd.conf244
1 files changed, 143 insertions, 101 deletions
diff --git a/openwrt/package/lighttpd/files/lighttpd.conf b/openwrt/package/lighttpd/files/lighttpd.conf
index 28f9e28f87..6e5137740e 100644
--- a/openwrt/package/lighttpd/files/lighttpd.conf
+++ b/openwrt/package/lighttpd/files/lighttpd.conf
@@ -4,65 +4,83 @@
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
-#server.modules = (
-# "mod_rewrite",
-# "mod_redirect",
-# "mod_auth",
-# "mod_status",
-# "mod_simple_vhost",
-# "mod_evhost",
-# "mod_cgi",
-# "mod_compress",
-# "mod_ssi",
-# "mod_usertrack"
+#server.modules = (
+# "mod_rewrite",
+# "mod_redirect",
+# "mod_alias",
+# "mod_auth",
+# "mod_status",
+# "mod_setenv",
+# "mod_fastcgi",
+# "mod_proxy",
+# "mod_simple_vhost",
+# "mod_cgi",
+# "mod_ssi",
+# "mod_usertrack",
+# "mod_expire"
#)
## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
-server.document-root = "/www/"
+server.document-root = "/www/"
## where to send error-messages to
-# server.errorlog = "/var/log/lighttpd/error.log"
-
-# files to check for if .../ is requested
-server.indexfiles = ( "index.html", "default.html",
- "index.htm", "default.htm" )
-
-# mimetype mapping
-mimetype.assign = (
- ".pdf" => "application/pdf",
- ".class" => "application/octet-stream",
- ".pac" => "application/x-ns-proxy-autoconfig",
- ".swf" => "application/x-shockwave-flash",
- ".wav" => "audio/x-wav",
- ".gif" => "image/gif",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".png" => "image/png",
- ".css" => "text/css",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".js" => "text/javascript",
- ".txt" => "text/plain",
- ".dtd" => "text/xml",
- ".xml" => "text/xml"
+#server.errorlog = "/var/log/lighttpd/error.log"
+
+## files to check for if .../ is requested
+index-file.names = ( "index.html", "default.html", "index.htm", "default.htm" )
+
+## mimetype mapping
+mimetype.assign = (
+ ".pdf" => "application/pdf",
+ ".class" => "application/octet-stream",
+ ".pac" => "application/x-ns-proxy-autoconfig",
+ ".swf" => "application/x-shockwave-flash",
+ ".wav" => "audio/x-wav",
+ ".gif" => "image/gif",
+ ".jpg" => "image/jpeg",
+ ".jpeg" => "image/jpeg",
+ ".png" => "image/png",
+ ".css" => "text/css",
+ ".html" => "text/html",
+ ".htm" => "text/html",
+ ".js" => "text/javascript",
+ ".txt" => "text/plain",
+ ".dtd" => "text/xml",
+ ".xml" => "text/xml"
)
-# Use the "Content-Type" extended attribute to obtain mime type if possible
-# mimetypes.use-xattr = "enable"
+## Use the "Content-Type" extended attribute to obtain mime type if possible
+#mimetypes.use-xattr = "enable"
+## send a different Server: header
+## be nice and keep it at lighttpd
+#server.tag = "lighttpd"
+
+$HTTP["url"] =~ "\.pdf$" {
+ server.range-requests = "disable"
+}
+
+##
+# which extensions should not be handle via static-file transfer
+#
+# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
+static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
-#server.port = 81
+#server.port = 81
## bind to localhost (default: all interfaces)
-#server.bind = "grisu.home.kneschke.de"
+#server.bind = "localhost"
## error-handler for status 404
-#server.error-handler-404 = "/error-handler.html"
-#server.error-handler-404 = "/error-handler.php"
+#server.error-handler-404 = "/error-handler.html"
+#server.error-handler-404 = "/error-handler.php"
+
+## to help the rc.scripts
+server.pid-file = "/var/run/lighttpd.pid"
###### virtual hosts
@@ -74,102 +92,126 @@ mimetype.assign = (
## virtual-server-root + virtual-server-default-host + virtual-server-docroot or
## virtual-server-root + http-host + virtual-server-docroot
##
-#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
-#simple-vhost.default-host = "grisu.home.kneschke.de"
-#simple-vhost.document-root = "/pages/"
+#simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
+#simple-vhost.default-host = "grisu.home.kneschke.de"
+#simple-vhost.document-root = "/pages/"
##
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix = "/www/error-"
+#server.errorfile-prefix = "/www/error-"
## virtual directory listings
-#server.dir-listing = "enable"
+#server.dir-listing = "enable"
## send unhandled HTTP-header headers to error-log
-#debug.dump-unknown-headers = "enable"
+#debug.dump-unknown-headers = "enable"
### only root can use these options
#
# chroot() to directory (default: no chroot() )
-#server.chroot = "/"
+#server.chroot = "/"
## change uid to <uid> (default: don't care)
-#server.username = "nobody"
+#server.username = "nobody"
## change uid to <uid> (default: don't care)
-#server.groupname = "nobody"
-
-## to help the rc.script
-#server.pid-file = "/var/run/lighttpd.pid"
+#server.groupname = "nobody"
#### compress module
#compress.cache-dir = "/dev/null/"
#compress.filetype = ("text/plain", "text/html")
+#### proxy module
+## read proxy.txt for more info
+#proxy.server = (
+# ".php" => (
+# "localhost" => (
+# "host" => "192.168.0.101",
+# "port" => 80
+# )
+# )
+#)
+
#### fastcgi module
## read fastcgi.txt for more info
-#fastcgi.server = ( ".php" =>
-# ( "grisu" =>
-# (
-# "host" => "192.168.2.10",
-# "port" => 1026
-# )
-# )
-# )
+#fastcgi.server = (
+# ".php" => (
+# "localhost" => (
+# "socket" => "/tmp/php-fastcgi.socket",
+# "bin-path" => "/usr/local/bin/php"
+# )
+# )
+#)
#### CGI module
-#cgi.assign = ( ".pl" => "/usr/bin/perl",
-# ".cgi" => "/usr/bin/perl" )
-#
+#cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
#### SSL engine
-#ssl.engine = "enable"
-#ssl.pemfile = "server.pem"
+#ssl.engine = "enable"
+#ssl.pemfile = "server.pem"
#### status module
-# status.status-url = "/server-status"
-# status.config-url = "/server-config"
+#status.status-url = "/server-status"
+#status.config-url = "/server-config"
#### auth module
## read authentification.txt for more info
-# auth.backend = "plain"
-# auth.backend.plain.userfile = "lighttpd.user"
-# auth.backend.plain.groupfile = "lighttpd.group"
-
-# auth.require = ( "/server-status" =>
-# (
-# "method" => "digest",
-# "realm" => "download archiv",
-# "require" => "group=www|user=jan|host=192.168.2.10"
-# ),
-# "/server-info" =>
-# (
-# "method" => "digest",
-# "realm" => "download archiv",
-# "require" => "group=www|user=jan|host=192.168.2.10"
-# )
-# )
+#auth.backend = "plain"
+#auth.backend.plain.userfile = "lighttpd.user"
+#auth.backend.plain.groupfile = "lighttpd.group"
+#auth.require = (
+# "/server-status" => (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "group=www|user=jan|host=192.168.2.10"
+# ),
+# "/server-info" => (
+# "method" => "digest",
+# "realm" => "download archiv",
+# "require" => "group=www|user=jan|host=192.168.2.10"
+# )
+#)
#### url handling modules (rewrite, redirect, access)
-# url.rewrite = ( "^/$" => "/server-status" )
-# url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
+#url.rewrite = ( "^/$" => "/server-status" )
+#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
-#
-# define a pattern for the host url finding
-# %% => % sign
-# %0 => domain name + tld
-# %1 => tld
-# %2 => domain name without tld
-# %3 => subdomain 1 name
-# %4 => subdomain 2 name
-#
-# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
+#### both rewrite/redirect support back reference to regex conditional using %n
+#$HTTP["host"] =~ "^www\.(.*)" {
+# url.redirect = ( "^/(.*)" => "http://%1/$1" )
+#}
#### expire module
-# expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
+#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
#### ssi
-# ssi.extension = ( ".shtml" )
-
+#ssi.extension = ( ".shtml" )
+
+#### setenv
+#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
+#setenv.add-response-header = ( "X-Secret-Message" => "42" )
+
+#### variable usage:
+## variable name without "." is auto prefixed by "var." and becomes "var.bar"
+#bar = 1
+#var.mystring = "foo"
+
+## integer add
+#bar += 1
+## string concat, with integer cast as string, result: "www.foo1.com"
+#server.name = "www." + mystring + var.bar + ".com"
+## array merge
+#index-file.names = (foo + ".php") + index-file.names
+#index-file.names += (foo + ".php")
+
+#### include
+#include /etc/lighttpd/lighttpd-inc.conf
+## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
+#include "lighttpd-inc.conf"
+
+#### include_shell
+#include_shell "echo var.a=1"
+## the above is same as:
+#var.a=1