Page 1 of 2

Creating a second webpage

Posted: Wed Oct 14, 2015 2:23 am
by nathanplatt
Hi Guys/Girls,

We currently use a RPi to display the map on a TV screen in HO, I'm trying to create a new page that will only show the map, I don't ant the details on the left hand to show this screen is for quick display purposes only, I do the management from my own PC.

I was trying to create another page and point the display at this but every time I try the map doesn't show. Any ideas how I can do this? Currently i have the map frame showing with the details on the left.

Also I'll like to make the map viewable by unauthorised people, can I do this, and if so, how?

Nathan

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 6:45 am
by rhassing
You could open http://<hostname>/nagios/cgi-bin/statusmap.cgi?host=all for the map only (without the rest on the left).

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 6:48 am
by nathanplatt
That does get rid of the frame on the right, but I just want a page that shows the map only.

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 6:57 am
by rhassing
Maybe the newer version (depending on your Nagios version)

http://<hostname>/nagios/map.html?host=all

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 7:01 am
by nathanplatt
I'm running 4.1.0rc1, this is bit i don't want to see;

Network Map for All Hosts
Last Updated: Wed Oct 14 13:03:24 2015
NagiosĀ® Coreā„¢ 4.1.0rc1 - www.nagios.org
Updated every 10 seconds
Logged in as nagiosadmin
View Status Detail For All Hosts
View Status Overview For All Hosts

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 7:10 am
by rhassing
Maybe you can check the html code of the map.html file and try to comment out what you don't want to see.

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 7:16 am
by nathanplatt
I was considering that but I need to have that viewable on 1 PC but not on another one... i just want the RPi to have the map only, and every other PC looking normal

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 9:31 am
by rhassing
The file could be copied to another directory. For each directory you van setup a different .htaccess file.
You could even have the .htaccess file redirect a certain ip address to the adjusted file, but that could be a bit more complicated.

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 9:38 am
by nathanplatt
So would i need to duplicate the share folder , if so how would i tell Apache that its a different site? Could I not just create another index page and call it something else, directing the RPi to that page instead?

Re: Creating a second webpage

Posted: Wed Oct 14, 2015 10:42 am
by rhassing
nathanplatt wrote:So would i need to duplicate the share folder , if so how would i tell Apache that its a different site? Could I not just create another index page and call it something else, directing the RPi to that page instead?
As I said:
You could even have the .htaccess file redirect a certain ip address to the adjusted file, but that could be a bit more complicated.

The answer might be found here:
http://stackoverflow.com/questions/9911 ... e-htaccess

You could create a rule that certain ip addresses redirect to a different url or file.

In a normal installation you would have /var/www/html as your default DocumnetRoot for Apache. If you copy just the adjusted map.html file in this directory should be enough.