So I have Nagios installed on my server and right now I can access it at http://server/nagios/. What I would really like to be able to do is have it at http://nagios.server/. How would I be able to change Nagios to allow me to do that? I'm running Ubuntu 10.04.
Thanks!
It is possible with so called virtual-hosts.
Here is a part of Apache httpd config example for doing this.
Here "/www/nagios" is pointing to directory, where your nagios pages are stored.
But nagios.server should be in your DNS records and point to the same IP as "server" record. Or you may add nagios.server to your local /etc/hosts file (or c:\windows\system32\drivers\etc\hosts)
There are some problems with what you would like to do...
1) in http://server/nagios: server is the HOSTNAME and nagios is a directory on the host.
2) in http://nagios.server/: nagios is the HOSTNAME and server is the domain that the host is a part of.
Therefore, it isn't possible to do what you would currently like to, without configuring your nagios server to have its hostname be nagios and even then you would access it by either http://nagios/ or http://nagios/nagios - depending on your httpd conf file.
Unless of course you wanted to set your hostname to be nagios and "bind" it to a domain named server
I.e. changing your hostname to be nagios.server