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