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>
Other websites not working after installing nagios
Re: Other websites not working after installing nagios
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.
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
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Other websites not working after installing nagios
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.