Icinga on Lighttpd and Wheezy

2014-01-02, 17:46

As I haven’t found any work­ing ex­am­ple con­fig­u­ra­tion for run­ning icin­ga on a sub do­main with lighttpd, I will here pre­sent my work­ing so­lu­tion.
First of all, we need to in­stall the soft­ware it­self:

  $ apt-get install icinga icinga-doc

We cre­ate the file /etc/lighttpd/conf-available/50-icinga.conf to have a con­fig­u­ra­tion which is easy en- and dis­able:

$HTTP[“host”] =~ “” { auth.backend = “htdigest” auth.backend.htdigest.userfile = “/etc/lighttpd/icinga.htdigest” auth.require = ( “/” => ( “method” => “digest”, “realm” => “icinga”, “require” => “valid-user” ) )

server.document-root = “/usr/share/icinga/htdocs” alias.url += ( “/cgi-bin/icinga” => “/usr/lib/cgi-bin/icinga”, “/icinga/stylesheets” => “/etc/icinga/stylesheets/”, “/icinga” => “/usr/share/icinga/htdocs”, “/stylesheets” => “/etc/icinga/stylesheets/”, ) $HTTP[“url”] =~ “^/cgi-bin/” { dir-listing.activate = “disable” cgi.assign = ( “.pl” => “/usr/bin/perl”, “.cgi” => “” ) } }

Now we can ac­ti­vate the newly cre­at­ed con­fig and two re­quire­ments for Lighty’s con­fig using:

  $ lighty-enable-mod auth cgi icinga

The au­then­ti­ca­tion is re­quired by icin­ga and it is high­ly en­cour­aged not to use a com­mon pass­word and a com­mon sub do­main. If the web in­ter­face does not de­tect any user name, it will load the web­site, but the ac­cess to the data is re­strict­ed to valid users.

Now we need to cre­ate the di­gest file, con­tain­ing the user names and pass­word-hash­es. We can there­for use the pro­gram htdigest, pro­vid­ed by apache2-utils, which should have been in­stalled as a de­pen­den­cy of icin­ga.

  $ htdigest -c "/etc/lighttpd/icinga.htdigest" icinga icingaadmin

For Icin­ga on Lighttpd using a sub di­rec­to­ry, take a look at Cy­conet Blog: Run­ning Icin­ga With Lighttpd on De­bian Wheezy

hosted by github
powered by acrylamid
Creative Commons Attribution 3.0 Unported License