2015-02-04 10:00:27 +01:00
|
|
|
## Configuration for Piratebox
|
|
|
|
|
|
|
|
server.modules = (
|
|
|
|
# "mod_access", not needed!
|
|
|
|
"mod_alias",
|
|
|
|
# "mod_compress", Disabled, fixing reload Problem??
|
|
|
|
"mod_redirect",
|
|
|
|
# "mod_rewrite",
|
|
|
|
"mod_setenv",
|
|
|
|
)
|
|
|
|
|
|
|
|
var.basedir=env.HOME + /tmp
|
|
|
|
|
|
|
|
server.document-root = basedir + "/www"
|
|
|
|
|
|
|
|
|
|
|
|
## Locate the tmp storage into tmp. It is in most cases the ram
|
|
|
|
## Limit the uploads to 4MB to save - especially on small devices
|
|
|
|
## the device from dieing because OUT-OF-RAM exceptions
|
|
|
|
## in KB => 4MB
|
|
|
|
server.upload-dirs = ( "/tmp" )
|
|
|
|
server.max-request-size = 4048
|
|
|
|
|
|
|
|
server.errorlog = "/tmp/error.log"
|
|
|
|
server.breakagelog = "/tmp/break.log"
|
|
|
|
server.pid-file = "/tmp/lighttpd.pid"
|
|
|
|
|
|
|
|
|
|
|
|
index-file.names = ( "index.php", "index.html",
|
|
|
|
"index.htm", "default.htm",
|
|
|
|
" index.lighttpd.html" )
|
|
|
|
|
|
|
|
url.access-deny = ( "~", ".inc" )
|
|
|
|
|
|
|
|
# added .cgi .py
|
|
|
|
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" , ".cgi" , ".py" )
|
|
|
|
|
|
|
|
|
|
|
|
# Enable lighttpd on ipv6
|
|
|
|
$SERVER["socket"] == "[::]:8001" { }
|
|
|
|
server.port = 8001
|
|
|
|
|
|
|
|
dir-listing.encoding = "utf-8"
|
|
|
|
server.dir-listing = "enable"
|
|
|
|
|
|
|
|
# Grabs main css
|
|
|
|
dir-listing.external-css = "/css/page_style.css"
|
|
|
|
|
|
|
|
# Header
|
|
|
|
# Enables header section
|
|
|
|
dir-listing.show-header = "enable"
|
|
|
|
dir-listing.encode-header = "disable"
|
|
|
|
# Hides HEADER.txt from listing
|
|
|
|
dir-listing.hide-header-file = "enable"
|
|
|
|
|
|
|
|
# Footer
|
|
|
|
# Enables footer section
|
|
|
|
dir-listing.show-readme = "enable"
|
|
|
|
dir-listing.encode-readme = "disable"
|
|
|
|
# Hides README.txt from listing
|
|
|
|
dir-listing.hide-readme-file = "enable"
|
|
|
|
# Diables default footer text
|
|
|
|
dir-listing.set-footer = " "
|
|
|
|
|
|
|
|
## custom MIME-Type support
|
|
|
|
include "piratebox/piratebox/conf/lighttpd/mime.types"
|
|
|
|
|
|
|
|
#----------- cgi.conf --------------
|
|
|
|
server.modules += ( "mod_cgi" )
|
|
|
|
|
|
|
|
$HTTP["url"] =~ "^/cgi-bin/" {
|
|
|
|
cgi.assign = ( ".py" => "/usr/bin/python2" )
|
|
|
|
}
|
|
|
|
|
|
|
|
$HTTP["url"] =~ "^/board/" {
|
|
|
|
cgi.assign = ( ".pl" => "/usr/bin/perl" , )
|
|
|
|
}
|
|
|
|
#-------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 404 Error Page with redirect
|
|
|
|
#
|
2017-05-22 07:35:36 +02:00
|
|
|
#server.error-handler-404 = "/index.html"
|
2015-02-04 10:00:27 +01:00
|
|
|
|
|
|
|
## for better debugging
|
|
|
|
#server.modules += ( "mod_accesslog" )
|
|
|
|
#accesslog.filename = "/tmp/access.log"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include "piratebox/piratebox/conf/lighttpd/fastcgi.conf"
|
|
|
|
|
|
|
|
|
|
|
|
setenv.add-environment = (
|
|
|
|
"SHOUTBOX_GEN_HTMLFILE" => basedir "/chat_content.html" ,
|
|
|
|
"SHOUTBOX_CHATFILE" => basedir + "/cgi-bin/data.pso" ,
|
|
|
|
"SHOUTBOX_CLIENT_TIMESTAMP" => "yes"
|
|
|
|
)
|