ini 适用于lighthttpd的PIHOLE配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini 适用于lighthttpd的PIHOLE配置相关的知识,希望对你有一定的参考价值。
# sudo nano /etc/lighttpd/lighttpd.conf
server.modules = (
"mod_access",
"mod_accesslog",
"mod_expire",
"mod_compress",
"mod_redirect",
"mod_setenv",
"mod_rewrite"
)
server.document-root = "/var/www/html"
server.error-handler-404 = "pihole/index.html"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
accesslog.filename = "/var/log/lighttpd/access.log"
accesslog.format = "%{%s}t|%V|%r|%s|%b"
index-file.names = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
$HTTP["url"] =~ "^/admin/" {
setenv.add-response-header = (
"X-Pi-hole" => "The Pi-hole Web interface is working!",
"X-Frame-Options" => "DENY"
)
}
$HTTP["url"] =~ "^(?!/admin)/.*" {
setenv.add-response-header = ( "X-Pi-hole" => "A black hole for Internet advertisements." )
url.rewrite = ("(.*).js" => "pihole/index.js")
}
以上是关于ini 适用于lighthttpd的PIHOLE配置的主要内容,如果未能解决你的问题,请参考以下文章
ini 适用于A +级的Nginx SSL配置
ini 适用于strongSwan vpn road warrior配置的Nftables
ini Tmux版本验证(适用于v1.8到v2.1)
云原生之使用Docker部署轻量级web服务器lighthttpd
text PiHole DNS Blocklist小米
text 通过使用433丢弃传入的https来加速pihole