50-icinga.conf
· 954 B · Text
Raw
# 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"
)
)
}
| 1 | # Load setenv module (as there is no template in |
| 2 | # /etc/lighttpd/conf-available and it's not loaded by default) |
| 3 | server.modules += ( "mod_setenv" ) |
| 4 | |
| 5 | # Aliases for needed directories |
| 6 | alias.url += ( |
| 7 | "/cgi-bin/icinga" => "/usr/lib/cgi-bin/icinga", |
| 8 | "/icinga/stylesheets" => "/etc/icinga/stylesheets", |
| 9 | "/icinga" => "/usr/share/icinga/htdocs", |
| 10 | ) |
| 11 | |
| 12 | # Enable cgi for /cgi-bin/icinga |
| 13 | $HTTP["url"] =~ "^/cgi-bin/icinga" { |
| 14 | dir-listing.activate = "disable" |
| 15 | cgi.assign = ( ".cgi" => "" ) |
| 16 | } |
| 17 | |
| 18 | # Enable authentication for /icinga and /cgi-bin/icinga |
| 19 | $HTTP["url"] =~ "^/(cgi-bin/)?icinga/" { |
| 20 | auth.backend = "htpasswd" |
| 21 | auth.backend.htpasswd.userfile = "/etc/icinga/htpasswd.users" |
| 22 | auth.require += ( "" => |
| 23 | ( |
| 24 | "method" => "basic", |
| 25 | "realm" => "Icinga Access", |
| 26 | "require" => "valid-user" |
| 27 | ) |
| 28 | ) |
| 29 | } |