Page 2 of 2

Re: how to change nagios default port

Posted: Fri Nov 20, 2015 10:11 am
by rkennedy
Then the above instructions should work for you fine, you will have to change the directories according to how they're set in Ubuntu.

Re: how to change nagios default port

Posted: Tue Nov 24, 2015 3:30 am
by harsha.s.aryan
hi,

i have added the below string in /usr/local/nagios/share/config.inc.php file but still i am unable to connect nagios using http://localhost:8081 url
$cfg['port_number'] =8081

Re: how to change nagios default port

Posted: Tue Nov 24, 2015 10:10 am
by rkennedy
File - /etc/httpd/conf/httpd.conf
Look for Listen 80 change to Listen 8081
Did you look for that file and modify it as well? Both need to be modified, followed by restarts of both services. (apache and nagios)

Re: how to change nagios default port

Posted: Tue Nov 24, 2015 11:32 am
by harsha.s.aryan
hi if i

add below thing in httpd.conf also i am getting error

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


i have to usee like :- http://localhost:8081/nagios

i am looking like http://localhost:8081/

Without any /nagios i want to access.

Re: how to change nagios default port

Posted: Tue Nov 24, 2015 12:52 pm
by rkennedy
Do you have it working by accessing http://localhost:8081 ?

As for taking the /nagios out, there are many changes that would need to be done for this. Are you trying to do this for a specific reason?

Alternatively, you could just create a file called index.php located at the base of your www directory. From there fill it with following -

Code: Select all

<?php
header("Location: http://localhost:8081/nagios")
?>

This will redirect all traffic that hits http://localhost:8081 to your nagios install.