I'm trying to configure nagios on webmin. I've ran through the tutorial but its still not working by that i mean when i goto web1.example.com/nagios is shows nothing, there doesn't seem to be a link to the /usr/local/nagios/share folder. I was thinking it's maybe needs a virtual host file setup but when i add the virtual host is says on restarting apache2.service
Oct 27 11:22:36 nagios.monster-it.uk apachectl[24761]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/httpd/' for error log of vhost defined at /etc/apache2/sites-enabled/nagios.conf:1
Oct 27 11:22:36 nagios.monster-it.uk apachectl[24761]: AH00014: Configuration check failed
Oct 27 11:22:36 nagios.monster-it.uk apachectl[24761]: Action 'graceful' failed.
Oct 27 11:22:36 nagios.monster-it.uk apachectl[24761]: The Apache error log may have more information.
. It's given a template conf file for Apache but I need to make a virtualhost file but not sure how to go about it.
<VirtualHost *:80>
ServerName nagios.monster-it.uk
ServerAlias nagios
ServerAdmin webmaster@example.org
DocumentRoot /usr/local/nagios/share
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
ScriptAlias /cgi-bin /usr/local/nagios/sbin
Alias /nagios /usr/local/nagios/share
<Directory /usr/local/nagios/share>
Options Indexes FollowSymLinks MultiViews
# SSLRequireSSL
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>
ErrorLog /var/log/httpd/nagios_error.log
LogLevel warn
CustomLog /var/log/httpd/nagios_access.log combined
ServerSignature On
</VirtualHost>
SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
This file contains examples of entries that need
to be incorporated into your Apache web server
configuration file. Customize the paths, etc. as
needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
SSLRequireSSL
Options ExecCGI
AllowOverride None
= 2.3>
Require all granted
Require host 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
Order allow,deny
Allow from all
Order deny,allow
Deny from all
Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
SSLRequireSSL
Options None
AllowOverride None
= 2.3>
Require all granted
Require host 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</RequireAll>
Order allow,deny
Allow from all
Order deny,allow
Deny from all
Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user