I am trying to access the featureInfo in my application and I keep getting 502 Bad Gateway Network error. In teh console log under the response tab I am getting this error,

This proxy does not allow you to access that location (castle.iplantcollaborative.org:8080).

The GET param is,


My /usr/lib/cgi-bin/proxy.cgi has the domain's url added to it's allowed hosts. The apache error.log file was giving this error,

Permission denied: exec of '/usr/lib/cgi-bin/proxy.cgi' failed

But when I changed the chmod for the proxy.cgi file to root:root it is not giving that error but it continues to give 502 Bad Gateway. I know I need to make some changes somewhere in the user permissions but not sure where?

Any idea what I should correct?

2 Answers 2


I had to simply clear the browser history. This is so dumb :P

Just make sure the ip address or the domain name is added to the allowed hosts in the /usr/lib/cgi-bin/proxy.cgi script.

  • this was the answer to my questions! thanks a lot! i use Openlayers and with setting the OpenLayers.ProxyHost in my code, it works perfectly fine!
    – g07kore
    Feb 27, 2015 at 18:16

solved the problem using proxy.php.

I got the file from the last Mapbuilder app, and its just copy the proxy.php file in my /var/www/ directory. In openlayers edit/add the line

OpenLayers.ProxyHost = "/proxy.php?url="


response to comment: To setup the proxy see Geoserver Documentation. http://www.gistutor.com/geoserver/21-intermediate-geoserver-tutorials/38-configuring-geoserver-proxy-for-public-and-remote-data-access.html

  • can u share where the proxy.php is?
    – Sam007
    Dec 11, 2012 at 18:25
  • updated the post.
    – Mapperz
    Dec 11, 2012 at 19:27
  • thanks I did not know about the direct proxy to Geoserver. Thanks for sharing
    – Sam007
    Dec 11, 2012 at 21:15
  • the above link is broken.
    – Zach
    Aug 28, 2014 at 17:15
  • @Zach fixed link
    – Mapperz
    Aug 28, 2014 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.