proxypassreverse graph_view.php page not displayed

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Adamp
Posts: 2
Joined: Thu Jun 23, 2011 8:01 am

proxypassreverse graph_view.php page not displayed

Post by Adamp »

Hi

I have an unusual issue with apache proxypassreverse not displaying the graphs page in cacti. This is the only page that appears to be causing an issue, i.e clicking on any link in the menu bar results in the correct page loading, selecting devices etc but as soon as the graph button is clicked I get The requested URL /cacti/graph_view.php was not found on this server.

A brief explanation of the apache config is below:

Our gateway server is used to access cacti, for the explanations i'll call them gateway-ip and cacti1 . the gateway server has the following apache location
<Location /cacti1/>
ProxyPass http://cacti1/cacti/
ProxyPassReverse http://cacti1/cacti/
</Location>

As mentioned above all pages are working except for the graph_view.php requests. As an aside if I access the cacti server directly the graph pages are working correctly.


Working process

gateway server
Jun 23 14:41:53 - noc [23/Jun/2011:14:41:53 +0100] "GET /cacti1/index.php HTTP/1.1" 200 1529 "http://gateway-ip/cacti1/index.php"
Jun 23 14:41:57 - noc [23/Jun/2011:14:41:57 +0100] "GET /cacti1/host.php HTTP/1.1" 200 5302 "http://gateway-ip/cacti1/index.php"

cacti server
- noc [23/Jun/2011:14:41:53 +0100] "GET /cacti/index.php HTTP/1.1" 200 5982 "http://gateway-ip/cacti1/index.php"
- noc [23/Jun/2011:14:41:57 +0100] "GET /cacti/host.php HTTP/1.1" 200 37198 "http://gateway-ip/cacti1/index.php"


Not working

gateway server
Jun 23 14:38:43 - noc [23/Jun/2011:14:38:43 +0100] "GET /cacti1/graph_view.php HTTP/1.1" 302 20 "http://gateway-ip/cacti1/index.php"
Jun 23 14:38:43 - - [23/Jun/2011:14:38:43 +0100] "GET /cacti/graph_view.php?action=tree&tree_id=17&select_first=true HTTP/1.1" 404 190

cacti server
- noc [23/Jun/2011:14:38:43 +0100] "GET /cacti/graph_view.php HTTP/1.1" 302 - "http://gateway-ip/cacti1/index.php"

Hovering over the button in the browser the url appears to be correct yet when clicked returns to the base url of the cacti server i.e /cacti/graph_view.php instead of /cacti1/graph_view.php


Does anyone know whether there is some kind of rewrite or url specification happening for the graph_view pages or why this would only be happening for this one section of cacti?

Many thanks

Adam
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: proxypassreverse graph_view.php page not displayed

Post by noname »

Try this, without <Location>...</Location> directives.
ProxyPass /cacti1/ http://cacti1/cacti/
ProxyPassReverse /cacti1/ http://cacti1/cacti/
If this worked, I think:

When accessig /cacti/graph_view.php, Cacti redirects itself (HTTP status code:302) to /cacti/graph_view.php with some parameters.
(I'm not sure, but <Location> affects to ProxyPass only?) Perhaps your rule isn't applied when redirected, so client tried to access 'http://gateway-ip/cacti/xxxx'.

If not worked.. sorry.
Adamp
Posts: 2
Joined: Thu Jun 23, 2011 8:01 am

Re: proxypassreverse graph_view.php page not displayed

Post by Adamp »

Hi

Thanks for the reply, unfortunately this doesn't work. It was one of the first things I tested and I get exactly the same results outside of a location. All pages except for the graph_view load.

The unusual thing is the first time I load the graph_view it is successful but then anytime after that it fails with the error shown in my original post
jmtorne
Posts: 1
Joined: Wed Jul 02, 2014 12:45 pm

Re: proxypassreverse graph_view.php page not displayed

Post by jmtorne »

Hi,

I've been experiencing exactly the same problem and I've been trying to debug this for the last couple of days. I finally got it to work.

This is the Apache proxy config I need for it to work:

ProxyPass /monitor/cacti/ http://192.168.123.45/cacti/
ProxyPassReverse /monitor/cacti/ http://192.168.123.45/cacti/
ProxyHTMLURLMap http://192.168.123.45/cacti/ /monitor/cacti/
<Location /monitor/cacti>
ProxyPassReverse /cacti
ProxyHTMLEnable on
ProxyHTMLURLMap /cacti/ /monitor/cacti/
</Location>



FYI, I'm using the following external URL to access the internal Cacti:
http://<myproxyipaddr>/monitor/cacti/
(note the last slash!)


I'm not sure if all these statements are strictly necessary (maybe some could be missed) but I really don't want to spend more time debugging it!

Hope it helps!
Cheers,


Txema
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests