version 1.1.1.1, 2013/10/14 10:32:47
|
version 1.1.1.2, 2016/11/02 10:35:00
|
Line 1
|
Line 1
|
debug.log-request-handling = "enable" |
debug.log-request-handling = "enable" |
debug.log-request-header = "enable" |
debug.log-request-header = "enable" |
debug.log-response-header = "enable" |
debug.log-response-header = "enable" |
debug.log-condition-handling = "enable" | #debug.log-condition-handling = "enable" |
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
|
|
## 64 Mbyte ... nice limit |
## 64 Mbyte ... nice limit |
Line 19 server.tag = "Apache 1.3.29"
|
Line 19 server.tag = "Apache 1.3.29"
|
|
|
server.dir-listing = "enable" |
server.dir-listing = "enable" |
|
|
#server.event-handler = "linux-sysepoll" | server.modules = ( |
#server.event-handler = "linux-rtsig" | "mod_rewrite", |
| "mod_setenv", |
| "mod_secdownload", |
| "mod_access", |
| "mod_auth", |
| "mod_status", |
| "mod_expire", |
| "mod_simple_vhost", |
| "mod_redirect", |
| "mod_fastcgi", |
| "mod_cgi", |
| "mod_compress", |
| "mod_userdir", |
| "mod_ssi", |
| "mod_accesslog", |
| ) |
|
|
#server.modules.path = "" | server.indexfiles = ( |
server.modules = ( | "index.php", |
"mod_rewrite", | "index.html", |
"mod_setenv", | "index.htm", |
"mod_secdownload", | "default.htm", |
"mod_access", | ) |
"mod_auth", | |
# "mod_httptls", | |
"mod_status", | |
"mod_expire", | |
"mod_simple_vhost", | |
"mod_redirect", | |
# "mod_evhost", | |
# "mod_localizer", | |
"mod_fastcgi", | |
"mod_cgi", | |
"mod_compress", | |
"mod_userdir", | |
"mod_ssi", | |
"mod_accesslog" ) | |
|
|
server.indexfiles = ( "index.php", "index.html", |
|
"index.htm", "default.htm" ) |
|
|
|
|
|
######################## MODULE CONFIG ############################ |
######################## MODULE CONFIG ############################ |
|
|
ssi.extension = ( ".shtml" ) | ssi.extension = ( |
| ".shtml", |
| ) |
|
|
accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" | accesslog.filename = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.access.log" |
|
|
mimetype.assign = ( ".png" => "image/png", | mimetype.assign = ( |
".jpg" => "image/jpeg", | ".png" => "image/png", |
".jpeg" => "image/jpeg", | ".jpg" => "image/jpeg", |
".gif" => "image/gif", | ".jpeg" => "image/jpeg", |
".html" => "text/html", | ".gif" => "image/gif", |
".htm" => "text/html", | ".html" => "text/html", |
".pdf" => "application/pdf", | ".htm" => "text/html", |
".swf" => "application/x-shockwave-flash", | ".pdf" => "application/pdf", |
".spl" => "application/futuresplash", | ".swf" => "application/x-shockwave-flash", |
".txt" => "text/plain", | ".spl" => "application/futuresplash", |
".tar.gz" => "application/x-tgz", | ".txt" => "text/plain", |
".tgz" => "application/x-tgz", | ".tar.gz" => "application/x-tgz", |
".gz" => "application/x-gzip", | ".tgz" => "application/x-tgz", |
".c" => "text/plain", | ".gz" => "application/x-gzip", |
".conf" => "text/plain" ) | ".c" => "text/plain", |
| ".conf" => "text/plain", |
| ) |
|
|
$HTTP["host"] == "cache.example.org" { |
$HTTP["host"] == "cache.example.org" { |
compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/" | compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/" |
} |
} |
compress.filetype = ("text/plain", "text/html") | compress.filetype = ( |
| "text/plain", |
| "text/html", |
| ) |
|
|
setenv.add-environment = ( "TRAC_ENV" => "tracenv", "SETENV" => "setenv") | setenv.add-environment = ( |
setenv.add-request-header = ( "FOO" => "foo") | "TRAC_ENV" => "tracenv", |
setenv.add-response-header = ( "BAR" => "foo") | "SETENV" => "setenv", |
| ) |
| setenv.add-request-header = ( |
| "FOO" => "foo", |
| ) |
| setenv.add-response-header = ( |
| "BAR" => "foo", |
| ) |
|
|
$HTTP["url"] =~ "\.pdf$" { |
$HTTP["url"] =~ "\.pdf$" { |
server.range-requests = "disable" | server.range-requests = "disable" |
} |
} |
|
|
fastcgi.debug = 0 | fastcgi.debug = 0 |
fastcgi.server = ( ".php" => ( ( "host" => "127.0.0.1", "port" => 1026, "broken-scriptfilename" => "enable", "allow-x-send-file" => "enable" ) ), | fastcgi.server = ( |
"/prefix.fcgi" => ( ( "host" => "127.0.0.1", "port" => 1026, "check-local" => "disable", "broken-scriptfilename" => "enable" ) ) | ".php" => ( ( |
) | "host" => "127.0.0.1", |
| "port" => 1026, |
| "broken-scriptfilename" => "enable", |
| "allow-x-send-file" => "enable", |
| ) ), |
| "/prefix.fcgi" => ( ( |
| "host" => "127.0.0.1", |
| "port" => 1026, |
| "check-local" => "disable", |
| "broken-scriptfilename" => "enable", |
| ) ), |
| ) |
|
|
|
cgi.assign = ( |
|
".pl" => env.PERL, |
|
".cgi" => env.PERL, |
|
) |
|
|
cgi.assign = ( ".pl" => "/usr/bin/perl", | userdir.include-user = ( |
".cgi" => "/usr/bin/perl", | "jan", |
".py" => "/usr/bin/python" ) | ) |
| |
userdir.include-user = ( "jan" ) | |
userdir.path = "/" |
userdir.path = "/" |
|
|
ssl.engine = "disable" |
|
# ssl.pemfile = "server.pem" |
|
|
|
$HTTP["host"] == "auth-htpasswd.example.org" { |
$HTTP["host"] == "auth-htpasswd.example.org" { |
auth.backend = "htpasswd" | auth.backend = "htpasswd" |
} |
} |
|
|
auth.backend = "plain" | auth.backend = "plain" |
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user" |
auth.backend.plain.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.user" |
|
|
auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd" |
auth.backend.htpasswd.userfile = env.SRCDIR + "/tmp/lighttpd/lighttpd.htpasswd" |
|
|
|
auth.require = ( |
|
"/server-status" => ( |
|
"method" => "digest", |
|
"realm" => "download archiv", |
|
"require" => "group=www|user=jan|host=192.168.2.10", |
|
), |
|
"/server-config" => ( |
|
"method" => "basic", |
|
"realm" => "download archiv", |
|
"require" => "valid-user", |
|
), |
|
) |
|
|
auth.require = ( "/server-status" => | url.access-deny = ( |
( | "~", |
"method" => "digest", | ".inc", |
"realm" => "download archiv", | ) |
"require" => "group=www|user=jan|host=192.168.2.10" | |
), | |
"/server-config" => | |
( | |
"method" => "basic", | |
"realm" => "download archiv", | |
"require" => "valid-user" | |
) | |
) | |
|
|
url.access-deny = ( "~", ".inc") | url.rewrite = ( |
| "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1", |
| "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1", |
| ) |
|
|
url.rewrite = ( "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1", | url.rewrite-if-not-file = ( |
"^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1" ) | "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2", |
| ) |
|
|
url.rewrite-if-not-file = ( "^(/rewrite/[^?]*)(?:\?(.*))?$" => "/indexfile/rewrite.php?file=$1&$2" ) | expire.url = ( |
| "/expire/access" => "access 2 hours", |
| "/expire/modification" => "access plus 1 seconds 2 minutes", |
| ) |
|
|
expire.url = ( "/expire/access" => "access 2 hours", |
|
"/expire/modification" => "access plus 1 seconds 2 minutes") |
|
|
|
#cache.cache-dir = "/home/weigon/wwwroot/cache/" |
|
|
|
#### status module |
#### status module |
status.status-url = "/server-status" | status.status-url = "/server-status" |
status.config-url = "/server-config" | status.config-url = "/server-config" |
|
|
$HTTP["host"] == "vvv.example.org" { |
$HTTP["host"] == "vvv.example.org" { |
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" | server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
secdownload.secret = "verysecret" | secdownload.secret = "verysecret" |
secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" | secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
secdownload.uri-prefix = "/sec/" | secdownload.uri-prefix = "/sec/" |
secdownload.timeout = 120 | secdownload.timeout = 120 |
| secdownload.algorithm = "md5" |
} |
} |
|
|
|
$HTTP["host"] == "vvv-sha1.example.org" { |
|
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
|
secdownload.secret = "verysecret" |
|
secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
|
secdownload.uri-prefix = "/sec/" |
|
secdownload.timeout = 120 |
|
secdownload.algorithm = "hmac-sha1" |
|
} |
|
|
|
$HTTP["host"] == "vvv-sha256.example.org" { |
|
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
|
secdownload.secret = "verysecret" |
|
secdownload.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
|
secdownload.uri-prefix = "/sec/" |
|
secdownload.timeout = 120 |
|
secdownload.algorithm = "hmac-sha256" |
|
} |
|
|
$HTTP["host"] == "zzz.example.org" { |
$HTTP["host"] == "zzz.example.org" { |
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" | server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
server.name = "zzz.example.org" | server.name = "zzz.example.org" |
static-file.disable-pathinfo = "enable" | static-file.disable-pathinfo = "enable" |
} |
} |
|
|
$HTTP["host"] == "symlink.example.org" { |
$HTTP["host"] == "symlink.example.org" { |
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" | server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
server.name = "symlink.example.org" | server.name = "symlink.example.org" |
server.follow-symlink = "enable" | server.follow-symlink = "enable" |
} |
} |
|
|
$HTTP["host"] == "nosymlink.example.org" { |
$HTTP["host"] == "nosymlink.example.org" { |
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" | server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
server.name = "symlink.example.org" | server.name = "symlink.example.org" |
server.follow-symlink = "disable" | server.follow-symlink = "disable" |
} |
} |
|
|
$HTTP["host"] == "no-simple.example.org" { |
$HTTP["host"] == "no-simple.example.org" { |
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/" | server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/123.example.org/pages/" |
server.name = "zzz.example.org" | server.name = "zzz.example.org" |
} |
} |
|
|
$HTTP["host"] !~ "(no-simple\.example\.org)" { |
$HTTP["host"] !~ "(no-simple\.example\.org)" { |
simple-vhost.document-root = "pages" | simple-vhost.document-root = "pages" |
simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/" | simple-vhost.server-root = env.SRCDIR + "/tmp/lighttpd/servers/" |
simple-vhost.default-host = "www.example.org" | simple-vhost.default-host = "www.example.org" |
} |
} |
|
|
$HTTP["host"] == "auth.example.org" { |
$HTTP["host"] == "auth.example.org" { |
server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" | server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" |
server.name = "auth.example.org" | server.name = "auth.example.org" |
auth.backend = "htpasswd" | auth.backend = "htpasswd" |
auth.require = ( "" => | auth.require = ( |
( | "" => ( |
"method" => "basic", | "method" => "basic", |
"realm" => "download archiv", | "realm" => "download archiv", |
"require" => "valid-user" | "require" => "valid-user", |
) | ), |
) | ) |
} |
} |
|
|
$HTTP["host"] =~ "(vvv).example.org" { |
$HTTP["host"] =~ "(vvv).example.org" { |
url.redirect = ( "^/redirect/$" => "http://localhost:2048/" ) | url.redirect = ( |
| "^/redirect/$" => "http://localhost:2048/", |
| ) |
} |
} |
|
|
$HTTP["host"] =~ "(zzz).example.org" { |
$HTTP["host"] =~ "(zzz).example.org" { |
url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" ) | url.redirect = ( |
| "^/redirect/$" => "http://localhost:2048/%1", |
| ) |
} |
} |
|
|
$HTTP["host"] =~ "(remoteip)\.example\.org" { |
$HTTP["host"] =~ "(remoteip)\.example\.org" { |
$HTTP["remoteip"] =~ "(127\.0\.0\.1)" { | $HTTP["remoteip"] =~ "(127\.0\.0\.1)" { |
url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" ) | url.redirect = ( |
} | "^/redirect/$" => "http://localhost:2048/%1", |
| ) |
| } |
} |
} |
|
|
$HTTP["remoteip"] =~ "(127\.0\.0\.1)" { |
$HTTP["remoteip"] =~ "(127\.0\.0\.1)" { |
$HTTP["host"] =~ "(remoteip2)\.example\.org" { | $HTTP["host"] =~ "(remoteip2)\.example\.org" { |
url.redirect = ( "^/redirect/$" => "http://localhost:2048/%1" ) | url.redirect = ( |
} | "^/redirect/$" => "http://localhost:2048/%1", |
| ) |
| } |
} |
} |
|
|
$HTTP["host"] =~ "bug255\.example\.org$" { |
$HTTP["host"] =~ "bug255\.example\.org$" { |
$HTTP["remoteip"] == "127.0.0.1" { | $HTTP["remoteip"] == "127.0.0.1" { |
url.access-deny = ( "" ) | url.access-deny = ( |
} | "", |
| ) |
| } |
} |
} |
|
|
$HTTP["referer"] !~ "^($|http://referer\.example\.org)" { |
$HTTP["referer"] !~ "^($|http://referer\.example\.org)" { |
url.access-deny = ( ".jpg" ) | url.access-deny = ( |
| ".jpg", |
| ) |
} |
} |
|
|
# deny access for all image stealers |
# deny access for all image stealers |
$HTTP["host"] == "referer.example.org" { |
$HTTP["host"] == "referer.example.org" { |
$HTTP["referer"] !~ "^($|http://referer\.example\.org)" { | $HTTP["referer"] !~ "^($|http://referer\.example\.org)" { |
url.access-deny = ( ".png" ) | url.access-deny = ( |
} | ".png", |
| ) |
| } |
} |
} |
|
|
$HTTP["cookie"] =~ "empty-ref" { |
$HTTP["cookie"] =~ "empty-ref" { |
$HTTP["referer"] == "" { | $HTTP["referer"] == "" { |
url.access-deny = ( "" ) | url.access-deny = ( |
} | "", |
| ) |
| } |
} |
} |
|
|
|
$HTTP["host"] =~ "allow\.example\.org$" { |
|
url.access-allow = ( ".txt" ) # allow takes precedence over deny |
|
url.access-deny = ( ".txt" ) |
|
} |
|
|
$HTTP["host"] == "etag.example.org" { |
$HTTP["host"] == "etag.example.org" { |
static-file.etags = "disable" | static-file.etags = "disable" |
compress.filetype = () | compress.filetype = () |
} |
} |