0

I have a problem with proxy.cgi. I read other posts but didn't find a solution. When I make my WFS request in console, the following error comes up: "POST http:// localhost:8081/cgi-bin/proxy.cgi?url=http%3A%2F%2Flocalhost%3A8080%2Fgeoserver%2Fwfs 404 (Not Found)", in other words the application don't find my proxy.cgi file. My settings are:

  • OpenLayers.ProxyHost="/cgi-bin/proxy.cgi?url=" in OpenLayers.js;
  • uncomment tag servlet and servlet-mapping in web.xml file of server Tomcat;
  • add privileged="true" attribute to tag Context in context.xml of server Tomcat;
  • change first row of proxy.cgi in #!C:/Python27/python.exe (installation path on Windows 7).

Any idea how to resolve the problem?

enter image description here

1
  • Is proxy.gci executable?
    – Jay Laura
    Jan 14, 2013 at 14:56

1 Answer 1

1

I am not sure about the webserver that you are using, so I'll talk about the general steps.

A 404 error means that your proxy.cgi file is not found by your webserver.

  1. Can you access the proxy.cgi file in your browser? Open the link http:// localhost:8081/cgi-bin/proxy.cgi and see what happens.

  2. Is your server properly configured to work with cgi? You have mentioned Tomcat in your question, so have a look at this page: CGI How To

Once you can access the proxy.cgi, make sure that you have edited the proxy.cgi file to provide access to your Geoserver.

7
  • Hi Devdatta, thanks for your reply. I haven't access to proxy.cgi file in my browser, i have the 404 error. However, i configured proxy.cgi file (add 'localhost:8080' to allowedHosts variable, because geoserver run on localhost:8080) and server (uncomment tag servlet and servlet-mapping in web.xml file of server Tomcat). I don't understand why this anomaly. Thanks again.
    – Riccardo
    Jan 14, 2013 at 14:51
  • Hi Jay, thanks fot your reply. In the first row of my proxy.cgi file i wrote the installation path of python( #!/usr/bin/env python) and launch python before my application. Are there others step? If, yes, what are they? Thanks again.
    – Riccardo
    Jan 14, 2013 at 15:07
  • @Riccardo You need to make sure that your webserver supports cgi files. Can you tell me which webserver are you using? Jan 14, 2013 at 16:17
  • Devdatta my webserver is Apache Tomcat version 6.0.33
    – Riccardo
    Jan 14, 2013 at 16:45
  • @Riccardo Follow these steps to enable cgi tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html Jan 14, 2013 at 17:08

Your Answer

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

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