how to change nagios default port

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.
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

how to change nagios default port

Post 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
Regards,
Harsha
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: how to change nagios default port

Post by rhassing »

Nagios is using your apache installation.
You should change the Apache config for that.
Rob Hassing
Image
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

Re: how to change nagios default port

Post by harsha.s.aryan »

can you please let me know how to change as my apache is running in default configuration
Regards,
Harsha
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: how to change nagios default port

Post by rhassing »

Rob Hassing
Image
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

Re: how to change nagios default port

Post 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
Regards,
Harsha
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: how to change nagios default port

Post by rhassing »

This should be possible, please search for the apache config posibilities.
Rob Hassing
Image
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: how to change nagios default port

Post 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?
Former Nagios Employee
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

Re: how to change nagios default port

Post by harsha.s.aryan »

I am look for http://localhost:8081 this and I am using Ubuntu 14
Regards,
Harsha
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: how to change nagios default port

Post 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.
Former Nagios Employee
harsha.s.aryan
Posts: 52
Joined: Fri Nov 13, 2015 9:05 am

Re: how to change nagios default port

Post by harsha.s.aryan »

I am using nagios core 4 version
Regards,
Harsha
Locked