Skip to content

Instantly share code, notes, and snippets.

@xemoe
Last active October 25, 2024 12:05
Show Gist options
  • Save xemoe/5feeb2c5691fb90870e2db778113c2b8 to your computer and use it in GitHub Desktop.
Save xemoe/5feeb2c5691fb90870e2db778113c2b8 to your computer and use it in GitHub Desktop.
Lighttpd mod proxy (with subdirectory)
$HTTP["url"] =~ "^/grafana" {
proxy.server = ( "" =>
(( "host" => "127.0.0.1", "port" => 3001 ))
)
proxy.debug = 1
}
$SERVER["socket"] == ":3001" {
url.rewrite-once = ( "^/grafana/(.*)$" => "/$1" )
proxy.server = ( "" => ( "" => ( "host" => "127.0.0.1", "port" => 3000 )))
}
#
# From: http://stackoverflow.com/questions/14536554/lighttpd-configuration-to-proxy-rewrite-from-one-domain-to-another
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment