mirror of
https://github.com/PirateBox-Dev/PirateBoxScripts_Webserver.git
synced 2023-12-14 07:22:58 +01:00
b69632ca41
Pull Request Conflicts: piratebox/piratebox/conf/lighttpd/lighttpd.conf
99 lines
2.7 KiB
Text
99 lines
2.7 KiB
Text
## Configuration for Piratebox
|
|
|
|
server.modules = (
|
|
# "mod_access", not needed!
|
|
# "mod_alias",
|
|
# "mod_compress", Disabled, fixing reload Problem??
|
|
"mod_redirect",
|
|
# "mod_rewrite",
|
|
"mod_setenv",
|
|
)
|
|
|
|
server.document-root = "/opt/piratebox/www"
|
|
server.upload-dirs = ( "/opt/piratebox/share/tmp" )
|
|
server.errorlog = "/opt/piratebox/tmp/error.log"
|
|
server.breakagelog = "/opt/piratebox/tmp/break.log"
|
|
server.pid-file = "/opt/piratebox/tmp/lighttpd.pid"
|
|
|
|
server.username = "nobody"
|
|
server.groupname = "nogroup"
|
|
|
|
|
|
|
|
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" )
|
|
|
|
#include_shell "/usr/share/lighttpd/use-ipv6.pl"
|
|
|
|
dir-listing.encoding = "utf-8"
|
|
server.dir-listing = "enable"
|
|
dir-listing.hide-dotfiles = "enable"
|
|
|
|
# Grabs main css
|
|
dir-listing.external-css = "../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 = " "
|
|
|
|
# Disabled, maybe fixes reload problem on imageboard
|
|
#compress.cache-dir = "/var/cache/lighttpd/compress/"
|
|
#compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
|
|
|
|
#n.a. on router include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
|
include "/opt/piratebox/conf/lighttpd/mime.types"
|
|
|
|
#----------- ShoutBox-Env --------------
|
|
include "/opt/piratebox/conf/lighttpd/env"
|
|
|
|
#----------- cgi.conf --------------
|
|
server.modules += ( "mod_cgi" )
|
|
|
|
$HTTP["url"] =~ "^/cgi-bin/" {
|
|
# cgi.assign = ( "" => "" )
|
|
cgi.assign = ( ".py" => "/usr/bin/python" )
|
|
}
|
|
|
|
## Warning this represents a security risk, as it allow to execute any file
|
|
## with a .pl/.py even outside of /usr/lib/cgi-bin.
|
|
#
|
|
#cgi.assign = (
|
|
# ".pl" => "/usr/bin/perl",
|
|
# ".py" => "/usr/bin/python",
|
|
#)
|
|
|
|
$HTTP["url"] =~ "^/board/" {
|
|
cgi.assign = ( ".pl" => "/usr/bin/perl" , )
|
|
}
|
|
#-------------------------------------
|
|
|
|
|
|
|
|
# 404 Error Page with redirect
|
|
#
|
|
server.error-handler-404 = "/redirect.html"
|
|
|
|
## for better debugging
|
|
#server.modules += ( "mod_accesslog" )
|
|
#accesslog.filename = "/opt/piratebox/tmp/access.log"
|
|
|
|
|
|
|