ich möchte gerne ohne großen Eingriff in die Firmware (aka. RasperryMatic) ein weiteres Verzeichnis für Bilder anlegen und die Inhalte vom Lighttpd ausspielen lassen. Dazu lege ich /user/local/etc/config/lighttpd eine custom.conf wie folgt an:
Code: Alles auswählen
#######################################################################
##
## Modules to load
## -----------------
##
server.modules += (
"mod_alias"
)
#######################################################################
##
## MimeType handling
## -------------------
##
mimetype.assign += (
".svg" => "image/svg+xml"
)
#######################################################################
##
## Alias definition
## ---------------------
##
## dont forget to mkdir -p /etc/config/www
##
alias.url = (
"/addons/custom/" => "/etc/config/www/"
)
##
## restrict File Types
##
$HTTP["url"] =~ "^/addons/custom" {
url.access-allow = (
".gif", ".jpg", ".jpeg", ".png", ".svg"
)
}
##
## OPTIONAL: redirect http -> https
##
# $HTTP["scheme"] == "http" {
# $HTTP["host"] =~ ".*" {
# url.redirect = ("^/addons/custom/.*" => "https://%0$0")
# }
# }