Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
up vote 1 down vote accepted

It is possible with so called virtual-hosts.

Here is a part of Apache httpd config example for doing this.

<VirtualHost *>
ServerAdmin webmaster@server
DocumentRoot /www/nagios
ServerName nagios.server
ErrorLog logs/
TransferLog logs/

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)

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.