[OpenLayers-Users] WFS Proxy Issue

Christopher Schmidt crschmidt at metacarta.com
Wed Nov 22 10:50:30 EST 2006


On Tue, Nov 21, 2006 at 04:27:51PM -0000, joanne cook wrote:
> Hi Christopher,
>  
> Many thanks for the pointer there! The instructions below have worked up to a point, except that I can only seem to get a response if my proxy.cgi is actually called proxy.py, despite adding the appropriate lines in my apache httpd.conf file to use python for cgi. I ended up following these instructions here:
> http://www.python.org/infogami-faq/windows/how-do-i-use-python-for-cgi/
>  
> If I now go to http://localhost/cgi-bin/proxy.py I get to the OpenLayers homepage. However, having modified my Map page to set OpenLayers.ProxyHost = "/cgi-bin/proxy.py?url="
>  
> I now get an error message that says "Unhandled Request Return Bad Gateway". 

"Bad Gateway" is returned if proxy.cgi / proxy.py is loading a URL which
is not in its list of allowed hosts. The default is:


allowedHosts = ['www.openlayers.org', 'openlayers.org',
                'octo.metacarta.com', 
		'merrimack.metacarta.com', 
		'labs.metacarta.com', 'world.freemap.in']

If you edit this line inside proxy.py, you can add your own host to the
list. The reason for this is to prevent your server from being used as
an open proxy to any host on the web. 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list