Sign up ×
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 load WFS from geoserver. my geoserver is at localhost:8080 and webserver at localhost:80. Since there is a problem of crossdomain and my firebug showing "XMLHttpRequest cannot load *http://localhost:8080/geoserver/wfs. Origin *http://localhost is not allowed by Access-Control-Allow-Origin" I have created a proxy.cgi following But when I go to *http://localhost/cgi-bin/proxy.cgi its giving me openlayers site,when there is no proxy and just leading to *http://localhost/xampp, when there is a proxy(here proxy is my institute proxy to connect to internet )..

My problem is I am able to load the data from geoserver successfully(as if everything is fine) but my firebug is showing "POST *http://localhost/cgi-bin/proxy.cgi?url=http%3A%2F%2Flocalhost%3A8080%2Fgeoserver%2Fwfs undefined (undefined)". I am including OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; in my JS and

protocol: new OpenLayers.Protocol.WFS({ version: "1.0.0", srsName: "EPSG:4326", // this is the default url: "http://localhost:8080/geoserver/wfs", featureType: "states", featureNS: "" }),

I want to know why its working fine still giving me the error, Whats the error is about and how to fiix it......

Any help is highly appreciated..........

share|improve this question
@user1975 please only link to public urls - hyperlinking localhost is not useful to GISse users here. If you can put the application on a public url (webserver) where it is much easier to debug. (I removed the local hyperlinks...) – Mapperz May 27 '11 at 14:36
@Mapperz, thanks for informing, will not repeat this – Vikash Talanki May 27 '11 at 16:02
try using the full IP address of your 'localhost' - also try from another machine (i use remote desktop to do this) – Mapperz May 27 '11 at 16:52

Your Answer


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

Browse other questions tagged or ask your own question.