Last active
December 29, 2015 02:39
-
-
Save waja/7602246 to your computer and use it in GitHub Desktop.
lighttpd config for icinga on Debian wheezy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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