Page 1 of 2

how to change nagios default port

Posted: Thu Nov 19, 2015 10:17 am
by harsha.s.aryan
hi.

after installing nagios its working in nagios default port 80 how do I change it to 8081 or 7001 port

thanks

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 10:23 am
by rhassing
Nagios is using your apache installation.
You should change the Apache config for that.

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 10:28 am
by harsha.s.aryan
can you please let me know how to change as my apache is running in default configuration

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 10:37 am
by rhassing

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 10:43 am
by harsha.s.aryan
is it possible to to like below

default URL http://localhost/nagios

I am looking like http://localhost/8081

instead of giving /nagios I want to give port number to access nagios

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 10:49 am
by rhassing
This should be possible, please search for the apache config posibilities.

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 10:50 am
by rkennedy
Do you mean http://localhost:8081 or did you intend on http://localhost/8081?

What OS are you running? Is there a specific reason you'd like to change the port?

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 10:55 am
by harsha.s.aryan
I am look for http://localhost:8081 this and I am using Ubuntu 14

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 1:25 pm
by rkennedy
I believe there are 3 places you will need to change (this is for a RHEL box - the directories may be somewhat different on Ubuntu) -

File - /etc/httpd/conf/httpd.conf
Look for Listen 80 change to Listen 8081

File - /usr/local/nagiosxi/html/config.inc.php
Look for $cfg['port_number'] = 80; change to $cfg['port_number'] = 8081;

Admin > System Config > Manage System Config
- Change Program URL and External URL (if you have it set) to include the port.

Re: how to change nagios default port

Posted: Thu Nov 19, 2015 8:03 pm
by harsha.s.aryan
I am using nagios core 4 version