Page 1 of 1

Other websites not working after installing nagios

Posted: Wed Nov 19, 2014 2:02 am
by webserver
Hi,

I had just installed nagios into a new Linux Centos server. It works fine in monitoring servers but now I want to host some websites in it which i found that creating the web root folder in default path /var/www/html/ is not working. Here is the web config i added in httpd.conf. Can anyone help me?


NameVirtualHost xxx.xxx.xxx.xxx

<VirtualHost xxx.xxx.xxx.xxx:80>
DocumentRoot "/var/www/html/webroot"
ServerName domain.com
ServerAlias domain.com www.domain.com
<Directory "/var/www/html/webroot">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

Re: Other websites not working after installing nagios

Posted: Wed Nov 19, 2014 10:19 am
by rhassing
Normally in a default CentSO installation, there will be a file called nagiosconf in the /etc/httpd/conf.d/ directory.

This file will make all sites with /nagios/ in the url redirect to your nagios installation.

So http://www.mydomain.com/nagios/ will redirect to the nagios installation, but if it exists http://newsite.otherdomain.com/nagios/ will also redirect to your nagios installation.

All other sites will either redirect to the default documentroot (which would be /var/www/html in the default installation).

There should be no need to create a virtualhost.

Re: Other websites not working after installing nagios

Posted: Wed Nov 19, 2014 10:48 am
by slansing
Excellent suggestion rob, @OP I'd look into changing that. This is the reason why our documentation states that you must install on a fresh, minimal, and dedicated system. The packages, re-write rules, etc, that Nagios uses and forces will generally not play very nice with other software which uses the same mediums.