OpenLayers – Solving Proxy.cgi Issues with WFS and GeoServer

geoserveropenlayers-2wfs

I am having problems getting WFS data to display on a map using OpenLayers/GeoExt/GeoServer.

I created a proxy script like on this page:

http://trac.osgeo.org/openlayers/browser/trunk/openlayers/examples/proxy.cgi

I have put this is file in C:\Program Files\GeoServer 2.0.2\webapps\geoserver.

I have changed the path at the top line of the file to read

#!C:/Python26/python.exe -u

I have also added the address of the machine that I want to allow to the file (10.0.0.155:8080) and added an environment variable for python (the machine is running Windows XP).

When I point to the proxy.cgi in a web browser it just displays the proxy.cgi file in the web browser, when from what I have read it should be showing the OpenLayers homepage.

Does anyone know how I can get this to work?

Regards,

James

Best Answer

GeoServer doesn't provide a CGI folder so you either need to put the proxy script in you main server's CGI folder (if you are using Apache to serve GeoServer to the web) or go with the GeoServer proxy plugin http://geoserver.org/display/GEOS/GeoServer+Proxy+Extension that provides the same functionality with in the GeoServer environment.