Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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,

http://castle.iplantcollaborative.org:8080/geoserver/wms/?LAYERS=opengeo%3APimaPine,opengeo%3ABIEN_Species_Richness_Margalef,opengeo%3ABIEN_Species_Richness,opengeo%3ABIEN_Species_Richness_Margalef_Interpolated&QUERY_LAYERS=opengeo%3APimaPine,opengeo%3ABIEN_Species_Richness_Margalef,opengeo%3ABIEN_Species_Richness,opengeo%3ABIEN_Species_Richness_Margalef_Interpolated&STYLES=,,,&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&BBOX=-18295967.087793%2C-10684061.894102%2C18295967.087793%2C10684062.234102&FEATURE_COUNT=10&HEIGHT=546&WIDTH=935&FORMAT=image%2Fpng&INFO_FORMAT=application%2Fvnd.ogc.gml&SRS=EPSG%3A900913&X=174&Y=140

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?

share|improve this question
add comment

2 Answers 2

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="

http://lists.osgeo.org/pipermail/openlayers-users/2011-March/019840.html

response to comment: To setup the proxy see Geoserver Documentation. http://geoserver.org/display/GEOS/GeoServer+Proxy+Extension

share|improve this answer
    
can u share where the proxy.php is? –  Sam007 Dec 11 '12 at 18:25
    
updated the post. –  Mapperz Dec 11 '12 at 19:27
    
thanks I did not know about the direct proxy to Geoserver. Thanks for sharing –  Sam007 Dec 11 '12 at 21:15
add comment
up vote 0 down vote accepted

OH MY GOODNESS

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

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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