Skip to content

Instantly share code, notes, and snippets.

@waja
Last active December 29, 2015 02:39
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 waja/7602246 to your computer and use it in GitHub Desktop.
Save waja/7602246 to your computer and use it in GitHub Desktop.
lighttpd config for icinga on Debian wheezy
# Load setenv module (as there is no template in
# /etc/lighttpd/conf-available and it's not loaded by default)
server.modules += ( "mod_setenv" )
# Aliases for needed directories
alias.url += (
"/cgi-bin/icinga" => "/usr/lib/cgi-bin/icinga",
"/icinga/stylesheets" => "/etc/icinga/stylesheets",
"/icinga" => "/usr/share/icinga/htdocs",
)
# Enable cgi for /cgi-bin/icinga
$HTTP["url"] =~ "^/cgi-bin/icinga" {
dir-listing.activate = "disable"
cgi.assign = ( ".cgi" => "" )
}
# Enable authentication for /icinga and /cgi-bin/icinga
$HTTP["url"] =~ "^/(cgi-bin/)?icinga/" {
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/icinga/htpasswd.users"
auth.require += ( "" =>
(
"method" => "basic",
"realm" => "Icinga Access",
"require" => "valid-user"
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment