0

I'm trying to setup proxypass to map http://status.site.com/cacti to http://othersite.com:8080/cacti, but without mapping the whole /.

Here the conf:

<VirtualHost *:80>
    ServerName status.site.com
   ProxyRequests Off                                                                                                 


    ProxyPass             /cacti/       http://othersite.com:8080/cacti/                                            
    ProxyPassReverse      /cacti/       http://othersite.com:8080/cacti/                                            
    ProxyPreserveHost On                                                                        

</VirtualHost>

Now this works for the most part except for http://status.site.com/cacti/graph_view.php The tree like menu on the left hand side gets broken, the whole menu is expanded and there's no collapse/expand possibility. Also the menuitems are unclickable (yet correct links are shown when hovered over with the pointer).

With ProxyPass / http://othersite.com:8080/ this doesn't happen and everything works. How are those two approaches handled differently? I've tried various combinations with ProxyHTMLURLMap but no success.

vobelic
  • 193
  • 1
  • 5
  • 17

2 Answers2

0

Remove the trailing slash...

<VirtualHost *:80>
    ServerName status.site.com
    ProxyRequests Off                                                                                                 


    ProxyPass             /cacti       http://othersite.com:8080/cacti                                            
    ProxyPassReverse      /cacti       http://othersite.com:8080/cacti
    ProxyPreserveHost On                                                                        
</VirtualHost>
TheCompWiz
  • 7,409
  • 17
  • 23
  • I've tried that already, same issue. – vobelic Aug 18 '15 at 18:48
  • Look in the apache error log at what is being attempted to be accessed, and what errors are generated. Also, look at the javascript console in your browser of choice for errors and find out what is not being loaded (404 or 503 or some other errors) – TheCompWiz Aug 21 '15 at 00:05
  • Ah yes, js console does give some hints (error log on both servers isn't helpful): ReferenceError: findObj is not defined graph_view.php:199:3 uncaught exception: jsTree cookie: jQuery cookie plugin not included. . I'm guessing there are some problems with cookies.. – vobelic Aug 22 '15 at 17:32
0

I found that creating another proxy entry for /javascript solved the problem for me. So it would look something like this.

<VirtualHost *:80>
    ServerName status.site.com
    ProxyRequests Off  

    ProxyPass             /cacti         http://othersite.com:8080/cacti                                            
    ProxyPassReverse      /cacti         http://othersite.com:8080/cacti
    ProxyPass             /javascript    http://othersite.com:8080/javascript
    ProxyPassReverse      /javascript    http://othersite.com:8080/javascript

    ProxyPreserveHost On                                                                        
</VirtualHost>
ryscar
  • 1