nagios CSS and JS files 404 after adding FQDN to vhost confs

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
Shwele
Posts: 47
Joined: Tue Oct 03, 2017 3:00 am

nagios CSS and JS files 404 after adding FQDN to vhost confs

Post by Shwele »

I have installed nagiosxi and am using dedicated Centos7 server.

I wanted to access it via domain name I had in mind and I added following lines to every nagios related vhost file:

Code: Select all

<VirtualHost *:80>
ServerName nagios.civicatalyst.org
#nagios vhost config
</VirtualHost>
The CSS and JS are not loading and showing 404, I cant access them via domain name and neither with IP itself now.

Access log:

Code: Select all

xxx.xxx.xx.xx- - [25/Oct/2017:12:21:21 +0200] "GET / HTTP/1.1" 200 3077 "-" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx - - [25/Oct/2017:12:21:21 +0200] "GET /nagiosxi/images/nagios_logo_white_transbg.png HTTP/1.1" 404 243 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx - - [25/Oct/2017:12:21:21 +0200] "GET /nagiosxi/includes/css/bootstrap.3.min.css HTTP/1.1" 404 239 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx - - [25/Oct/2017:12:21:22 +0200] "GET /nagiosxi/includes/js/jquery/jquery-1.11.2.min.js HTTP/1.1" 404 246 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx- - [25/Oct/2017:12:21:22 +0200] "GET /nagiosxi/includes/css/themes/modern.css HTTP/1.1" 404 237 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx - - [25/Oct/2017:12:21:22 +0200] "GET /nagiosxi/includes/js/core.js HTTP/1.1" 404 226 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx- - [25/Oct/2017:12:21:22 +0200] "GET /nagiosxi/includes/css/base.css HTTP/1.1" 404 228 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx - - [25/Oct/2017:12:21:22 +0200] "GET /nagiosxi/includes/js/jquery/jquery-migrate-1.4.1.min.js HTTP/1.1" 404 253 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx - - [25/Oct/2017:12:21:22 +0200] "GET /nagiosxi/includes/js/jquery/jquery-migrate-1.4.1.min.js HTTP/1.1" 404 253 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx - - [25/Oct/2017:12:21:22 +0200] "GET /nagiosxi/includes/js/core.js HTTP/1.1" 404 226 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
xxx.xxx.xx.xx - - [25/Oct/2017:12:21:22 +0200] "GET /nagiosxi/images/nagios_logo_white_transbg.png HTTP/1.1" 404 243 "https://nagios.civicatalyst.org/" "Mozilla/5.0 (Windows NT 6.1; rv:56.0) Gecko/20100101 Firefox/56.0"
127.0.0.1 - - [25/Oct/2017:12:21:23 +0200] "POST /nagiosxi/backend/ HTTP/1.1" 404 215 "-" "BinGet/1.00.A (http://www.bin-co.com/php/scripts/load/)"

Sorry if there is similar issue on forum, couldn't find it or access it if its for paying customers only.
Thanks in advance
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: nagios CSS and JS files 404 after adding FQDN to vhost c

Post by npolovenko »

Hi, @Shwele. What are you trying to achieve? Do you want to be able to access Nagios XI from outside of the local network using a custom domain name? I believe it's not going to work like that. What you could do is set up ports rerouting on your router. So that Nagios XI can be accessed using your routers external IP from outside of the network. Usually, you access the routers settings by typing in IP address in the web browser. You'll see something like that:
HOW9942_05182015_01.png
After that, you need to reroute ports. Depending on what you're running ports will vary:
https://assets.nagios.com/downloads/nag ... tocols.pdf
I'd start with rerouting port 80 and port 443.

After your NagiosXI is accessible from outside of the network you can set up a forwarding on your domain. So that when people access nagios.civicatalyst.org it will automatically redirect them to the IP with XI.

Another solution would be to install the whole XI on the cloud service like Amazon:
https://assets.nagios.com/downloads/nag ... -Cloud.pdf
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
Shwele
Posts: 47
Joined: Tue Oct 03, 2017 3:00 am

Re: nagios CSS and JS files 404 after adding FQDN to vhost c

Post by Shwele »

Heya @npolovenko

I tried doing basic vhost config where I could just put the domain name I previously pointed at server nagiosxi is on.
Well, now you've told me what is the issue, guess Ill try to look it up. Im pretty new to Centos and I took this chance to learn more how it works. What routing is currently setup and how to make it work.
Accessing router is not possible, due that I'm managing servers for a company and am not working in hosting company itself, routers are inaccessible for me.

Will have to see what server side can offer :D

Ill look up documentation for more clues, that amazon is a good one.

In case you got remembered something to add let me know.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: nagios CSS and JS files 404 after adding FQDN to vhost c

Post by npolovenko »

@Shwele, Yeah, I'll let you know. It was a good try :D
I'll close this thread but if you'll have any other questions feel free to open a new one.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked