Totila
13
root@DietPi:~# cat /etc/lighttpd/conf-available/10-proxy.conf
# /usr/share/doc/lighttpd/proxy.txt
server.modules += ( "mod_proxy" )
## Balance algorithm, possible values are: "hash", "round-robin" or "fair" (default)
# proxy.balance = "hash"
## Redirect all queries to files ending with ".php" to 192.168.0.101:80
#proxy.server = ( ".php" =>
# (
# ( "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )
## Redirect all connections on www.example.com to 10.0.0.1{0,1,2,3}
#$HTTP["host"] == "www.example.com" {
# proxy.balance = "hash"
# proxy.server = ( "" => ( ( "host" => "10.0.0.10" ),
# ( "host" => "10.0.0.11" ),
# ( "host" => "10.0.0.12" ),
# ( "host" => "10.0.0.13" ) )
$HTTP["host"] == "mydomain.org" {
$HTTP["url"] =~ "^/notifications/hub($|/)" {
# WebSocket proxy
proxy.server = ( "" => ("vaultwarden" => ( "host" => "internalIP", "port" => 3012 )))
proxy.forwarded = ("for" => 1 )
proxy.header = (
"https-remap" => "enable",
"upgrade" => "enable",
"connect" => "enable"
)
}
#} else {
$HTTP["url"] =~ "^/vault($|/)" {
proxy.server = ( "" => ("vaultwarden" => ( "host" => "internalIP", "port" => 8001 )))
proxy.forwarded = ("for" => 1 )
proxy.header = ( "https-remap" => "enable" )
}
# }else {
$HTTP["url"] =~ "^/paperless($|/)" {
proxy.server = ( "" => ("paperless" => ( "host" => "internalIP", "port" => 8000 )))
proxy.forwarded = ("for" => 1 )
proxy.header = ( "https-remap" => "enable" )
}
#}
}