Add virtualhosts?

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
jriker1
Posts: 115
Joined: Tue Dec 15, 2015 8:40 pm

Add virtualhosts?

Post by jriker1 »

Think this is the term. So I have centos setup out of the box with just Nagios on it. When I go to the server name it pulls up servername/Nagios and there is my console. I am now trying to install a separate application on the same system which also has it's own websites. Don't want to break anything so thought I would ask here. How do I setup so if someone goes to http://nagios (name of Nagios in DNS), it continues to go where it's going now, and if I go to http://somethingelse it goes to the other website that will be setup?

Thanks.

JR
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Add virtualhosts?

Post by rhassing »

This is something you should be able to do within Apache.
Please have a look at the Apache website:

https://httpd.apache.org/docs/2.4/vhosts/examples.html
Rob Hassing
Image
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Add virtualhosts?

Post by dwhitfield »

Thanks @rhassing!

The only thing I would add is that if you are using frameworks/applications with other sites, you need to make sure you don't have package conflicts. You could figure out what those are now, but you are going to have to do it each time you upgrade. I am by no means saying you can't do it, I'm just saying this is something to keep in mind.

It might be easier in the long run to just set up two different virtual machines, although of course that will require more OS resource overhead.
Locked