Other websites not working after installing nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
webserver
Posts: 1
Joined: Wed Nov 19, 2014 12:37 am

Other websites not working after installing nagios

Post 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>
User avatar
rhassing
Posts: 412
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Other websites not working after installing nagios

Post 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.
Rob Hassing
Image
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Other websites not working after installing nagios

Post 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.
Locked