Skip to content

Instantly share code, notes, and snippets.

@marcinantkiewicz
Created February 18, 2021 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcinantkiewicz/d32d6f114ebe9b3e503f679cb8bb1ae1 to your computer and use it in GitHub Desktop.
Save marcinantkiewicz/d32d6f114ebe9b3e503f679cb8bb1ae1 to your computer and use it in GitHub Desktop.
lighttpd: redirect default ports to the unifi controller
# tls has to be enabled on :443 so that the connection can be terminated there before the redirect is sent back.
$SERVER["socket"] == ":80" {
$HTTP["host"] =~ ".*" {
url.redirect = (""=>"https://%0:8443/manage/site/default/dashboard")
}
}
$SERVER["socket"] == ":443" {
$HTTP["host"] =~ ".*" {
url.redirect = (""=>"https://%0:8443/manage/site/default/dashboard")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment