lighttpd: Some needed configuration cleanups
This commit is contained in:
parent
123c5b96f5
commit
70e90727e9
|
@ -0,0 +1,7 @@
|
|||
# 404 Error Page with redirect
|
||||
# only for non piratebox Domains, that makes UI development easier.
|
||||
$HTTP["host"] != var.PIRATEBOX_HOSTNAME {
|
||||
server.error-handler-404 = "/redirect.html"
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
dir-listing.encoding = "utf-8"
|
||||
server.dir-listing = "enable"
|
||||
|
||||
# Grabs main css
|
||||
dir-listing.external-css = "/content/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 = " "
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Fix for iOS7
|
||||
# It ask especially different domains without a specific URL.
|
||||
# It want to get a "success" message, to allow full system/internet access
|
||||
$HTTP["useragent"] =~ "CaptiveNetworkSupport" {
|
||||
server.document-root = "/opt/piratebox/www/library/test/"
|
||||
index-file.names = ( "success.html" )
|
||||
dir-listing.activate = "disable"
|
||||
server.error-handler-404 = "/success.html"
|
||||
}
|
||||
|
|
@ -3,10 +3,9 @@
|
|||
server.modules = (
|
||||
# "mod_access", not needed!
|
||||
"mod_alias",
|
||||
# "mod_compress", Disabled, fixing reload Problem??
|
||||
"mod_redirect",
|
||||
# "mod_rewrite",
|
||||
"mod_setenv",
|
||||
"mod_setenv",
|
||||
"mod_cgi",
|
||||
"mod_fastcgi"
|
||||
)
|
||||
|
||||
|
@ -23,8 +22,8 @@ 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"
|
||||
server.username = "nobody"
|
||||
server.groupname = "nogroup"
|
||||
|
||||
|
||||
|
||||
|
@ -41,31 +40,9 @@ static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" , ".cgi" , ".py" )
|
|||
# Enable lighttpd on ipv6
|
||||
$SERVER["socket"] == "[::]:80" { }
|
||||
|
||||
dir-listing.encoding = "utf-8"
|
||||
server.dir-listing = "enable"
|
||||
|
||||
# Grabs main css
|
||||
dir-listing.external-css = "/content/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 = " "
|
||||
|
||||
# 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" )
|
||||
# Enable default directory listing
|
||||
include "/opt/piratebox/conf/lighttpd/dirlisting-html.conf"
|
||||
|
||||
#n.a. on router include_shell "/usr/share/lighttpd/create-mime.assign.pl"
|
||||
include "/opt/piratebox/conf/lighttpd/mime.types"
|
||||
|
@ -74,10 +51,7 @@ include "/opt/piratebox/conf/lighttpd/mime.types"
|
|||
include "/opt/piratebox/conf/lighttpd/env"
|
||||
|
||||
#----------- cgi.conf --------------
|
||||
server.modules += ( "mod_cgi" )
|
||||
|
||||
$HTTP["url"] =~ "^/cgi-bin/" {
|
||||
# cgi.assign = ( "" => "" )
|
||||
cgi.assign = ( ".py" => "/usr/bin/python" )
|
||||
}
|
||||
|
||||
|
@ -94,14 +68,11 @@ $HTTP["url"] =~ "^/board/" {
|
|||
}
|
||||
#-------------------------------------
|
||||
|
||||
|
||||
# Avoid lazy browser caching
|
||||
setenv.add-response-header += ( "Cache-Control" => "max-age=60, must-revalidate, no-store, no-cache, public" )
|
||||
|
||||
# 404 Error Page with redirect
|
||||
# only for non piratebox Domains, that makes UI development easier.
|
||||
$HTTP["host"] != var.PIRATEBOX_HOSTNAME {
|
||||
server.error-handler-404 = "/redirect.html"
|
||||
}
|
||||
include "/opt/piratebox/conf/lighttpd/all-redirect.conf"
|
||||
|
||||
## for better debugging
|
||||
#server.modules += ( "mod_accesslog" )
|
||||
|
@ -109,15 +80,7 @@ $HTTP["host"] != var.PIRATEBOX_HOSTNAME {
|
|||
|
||||
|
||||
# Fix for iOS7
|
||||
# It ask especially different domains without a specific URL.
|
||||
# It want to get a "success" message, to allow full system/internet access
|
||||
$HTTP["useragent"] =~ "CaptiveNetworkSupport" {
|
||||
server.document-root = "/opt/piratebox/www/library/test/"
|
||||
index-file.names = ( "success.html" )
|
||||
dir-listing.activate = "disable"
|
||||
server.error-handler-404 = "/success.html"
|
||||
}
|
||||
|
||||
include "/opt/piratebox/conf/lighttpd/iOS7-fix.conf"
|
||||
|
||||
include "/opt/piratebox/conf/lighttpd/fastcgi-php-generate203.conf"
|
||||
|
||||
|
|
Loading…
Reference in New Issue