Page 1 of 1

How to make nagios with a nonstandard https port?

Posted: Tue Jul 15, 2014 1:29 am
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.

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

Posted: Tue Jul 15, 2014 12:21 pm
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?

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

Posted: Fri Mar 09, 2018 1:30 pm
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

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

Posted: Fri Mar 09, 2018 3:14 pm
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.

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

Posted: Fri Mar 09, 2018 3:34 pm
by dwall
I didn't think about the iptables. The iptables shows 8443 wasn't being accepted, just 80 and 443.

Thank you.

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

Posted: Fri Mar 09, 2018 4:09 pm
by cdienger
Glad to help!