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 have a GeoServer WMS in Apache-Tomcat at http://localhost:8080 and a mod_wsgi app in standard Apache at http://localhost:80/myapp.

My OpenLayers map is being hosted statically by the Apache-Tomcat Geoserver app at http://localhost:8080/geoserver/www/OL.html. The JavaScript in this map has to call the mod_wsgi app for non geographic data.

I've tried setting up a proxy in GeoServer the following ways

http://localhost:80/mypp

http://localhost

localhost

None of these work. After making a request some of my response object attributes look like this which means it's not really working. GeoServer logs show no errors

priority "NORMAL"
readyState 4
responseText ""
responseXM Lnull
status 0
statusText ""

Can't say I'm too much of an expert at Proxies. But it seems to me that I wouldn't need to set up a OpenLayers proxy (as mentioned here) if GeoServer can proxy for me.

Ideas, hints, advice?

share|improve this question
1  
well, it seems that the obvious 'text/plain' mimetype was the cause of the issue. Once i added this and changed my Proxy to localhost:80 then everything worked. For future people seeing this post i tested it using JQuery. The GET request looks like this $.get("/geoserver/rest/proxy?url=localhost:80/myapp";, {format : 'text/plain'}, function(data){console.log(data); }) –  maztaz Feb 1 '12 at 15:41
    
might be best to paste that comment in as an answer below, for ease of finding for the next person –  iant Feb 1 '12 at 17:30
    
@iant -- thanks for the suggestion and your previous help. Though I guess because of my "point" status i can't do it for another few hours ;-( –  maztaz Feb 1 '12 at 19:14

1 Answer 1

well, it seems that the obvious was at play here. The 'text/plain' mimetype was the cause of the issue. Once i added this to GeoServer's proxy mimetypes and changed my proxy to be "localhost:80" then everything worked.

For future people seeing this post i tested it using JQuery. The GET request looks like this:

$.get("/geoserver/rest/proxy?url=localhost:80/myapp";, {format : 'text/plain'}, function(data){console.log(data); }) 
share|improve this answer

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.