How to run icinga with a apache vHost?
I have installed icinga from the icinga own repos on my debian squeeze box but now I don't know how to change the current config:
# apache configuration for icinga
ScriptAlias /cgi-bin/icinga /usr/lib/cgi-bin/icinga
ScriptAlias /icinga/cgi-bin /usr/lib/cgi-bin/icinga
# Where the stylesheets (config files) reside
Alias /icinga/stylesheets /etc/icinga/stylesheets
# Where the HTML pages live
Alias /icinga /usr/share/icinga/htdocs
<DirectoryMatch (/usr/share/icinga/htdocs|/usr/lib/cgi- bin/icinga|/etc/icinga/stylesheets)>
Options FollowSymLinks
DirectoryIndex index.html
AllowOverride AuthConfig
#Order Deny, Allow
Deny from all
#Allow From 10.42.0.0/24
AuthName "Icinga Access"
AuthType Basic
AuthUserFile /etc/icinga/htpasswd.users
require valid-user
</DirectoryMatch>
I want to run icinga under the subdomain monitoring.mysite.com but I fail to make this config a working vHost config. Is there anybody out who can say what I have to change?
Solution 1:
Maybe because there is no VirtualHost, ServerName or DocumentRoot directives?
Replace the asterisk with IP depending on your configuration, however, the asterisk is standard procedure.
# apache configuration for icinga
<VirtualHost *:80>
ServerName monitoring.mysite.com
DocumentRoot /usr/share/icinga/htdocs
ScriptAlias /cgi-bin/icinga /usr/lib/cgi-bin/icinga
ScriptAlias /icinga/cgi-bin /usr/lib/cgi-bin/icinga
# Where the stylesheets (config files) reside
Alias /icinga/stylesheets /etc/icinga/stylesheets
# Where the HTML pages live
Alias /icinga /usr/share/icinga/htdocs
<DirectoryMatch (/usr/share/icinga/htdocs|/usr/lib/cgi-bin/icinga|/etc/icinga/stylesheets)>
Options FollowSymLinks
DirectoryIndex index.html
AllowOverride AuthConfig
Order Deny, Allow
#Deny from All
#Allow From 10.42.0.0/24
AuthName "Icinga Access"
AuthType Basic
AuthUserFile /etc/icinga/htpasswd.users
Require valid-user
</DirectoryMatch>
</VirtualHost>