How to make nagios with a nonstandard https port?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jziller27
Posts: 1
Joined: Fri Jul 04, 2014 12:46 am

How to make nagios with a nonstandard https port?

Post by jziller27 »

Hi,

I am using the latest VMware image, 64bit.

Everything works fine on port 443 but when i switch to listening on port 8443 any configuration changes hang forever on the "validating configuration" step.

I have made the following changes to /usr/local/nagiosxi/html/config.inc.php per other documentation:


Code: Select all

// force http/https
$cfg['use_https']=true;  // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP

// allow for different http port for subsystem calls
$cfg['port_number'] = 8443;
And of course modified apache ssl.conf for port 8443. I can access the Nagios web interface through port 8443 just fine but cannot save configurations.

My problem seems to be exactly the same as in this thread http://support.nagios.com/forum/viewtop ... f=6&t=5354 but there was never a confirmed resolution. I cant imagine running on a non-stardard port is an uncommon need. Please advise. Thanks!

Once i switch back to using port 443 everything works perfectly again.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: How to make nagios with a nonstandard https port?

Post by sreinhardt »

Could you post the information from Admin->System Profile, as well as download the profile.zip from the same page and pm it to one of us please?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
dwall
Posts: 4
Joined: Mon Oct 26, 2015 12:31 pm
Location: Olathe, KS
Contact:

Re: How to make nagios with a nonstandard https port?

Post by dwall »

I realize that this is an old post, but I see no reply as to how to make it work, and I need some assistance on migrating to port 8443.

Currently, I have ssl.conf listening to port 443. I have my URL as port 8443, and my firewall is redirecting 8443 to 443.
The Admin -> System Settings has the following URLs:
Program URL: https://nagiosxi.company.com:8443/nagiosxi
External URL: <blank>

The server is configured as nagiosxi.company.local

I have tried changing the ssl.conf to 8443 and, config.inc.php to use $cfg['port_number'] = 8443; (also tried using the value "true").
I reconfigure the firewall to send directly to 8443, but I can't connect to my nagiosxi server.

The reason for this change is we are making all of our internal web sites https, and adding the company.com to the internal DNS. Currently our internal DNS is company.local. The external IP address that we are currently tied to already has a back-end server tied to it using port 443.

Any help would amazing.

Dan
Dan Wall
Systems Engineer
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to make nagios with a nonstandard https port?

Post by cdienger »

Did you add the redirect rule to the XI machine or is the firewall another device? I haven't had much success getting this to work through Apache/XI config changes, but rerouting it with an iptables rule(no changes to ssl.conf or elsewhere were needed) on the XI machine seems to work:

# iptables -A PREROUTING -t nat -p tcp --dport 8443 -j REDIRECT --to-ports 443

Hopefully this helps.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dwall
Posts: 4
Joined: Mon Oct 26, 2015 12:31 pm
Location: Olathe, KS
Contact:

Re: How to make nagios with a nonstandard https port?

Post by dwall »

I didn't think about the iptables. The iptables shows 8443 wasn't being accepted, just 80 and 443.

Thank you.
Dan Wall
Systems Engineer
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How to make nagios with a nonstandard https port?

Post by cdienger »

Glad to help!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked