1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 14:18:15 +00:00

Merge pull request #1704 from celly/lighttpd-hide-files

Exclude files from Web Admin that should not be accessible.
This commit is contained in:
WaLLy3K 2017-09-23 11:36:03 +10:00 committed by GitHub
commit f0f7bda2f3
2 changed files with 12 additions and 2 deletions

View File

@ -41,7 +41,7 @@ accesslog.format = "%{%s}t|%V|%r|%s|%b"
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
url.access-deny = ( "~", ".inc", ".md", ".yml", ".ini" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
@ -66,5 +66,10 @@ $HTTP["url"] =~ "^/admin/" {
}
}
# Block . files from being served, such as .git, .github, .gitignore
$HTTP["url"] =~ "^/admin/\.(.*)" {
url.access-deny = ("")
}
# Add user chosen options held in external file
include_shell "cat external.conf 2>/dev/null"

View File

@ -42,7 +42,7 @@ accesslog.format = "%{%s}t|%V|%r|%s|%b"
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
url.access-deny = ( "~", ".inc", ".md", ".yml", ".ini" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
@ -85,5 +85,10 @@ $HTTP["url"] =~ "^/admin/" {
}
}
# Block . files from being served, such as .git, .github, .gitignore
$HTTP["url"] =~ "^/admin/\.(.*)" {
url.access-deny = ("")
}
# Add user chosen options held in external file
include_shell "cat external.conf 2>/dev/null"