0

I know this question has been addressed in the past but I am having trouble implementing what has been suggested here on my set up and I was hoping someone could help me hack through all of the information.

I am running GeoServer on port 8080 (version 2.5) on Windows server 2012. I would like to have an OpenLayers 3 application on port 80. I can draw the layers without issue but getting information using this example just isn't working for me.

I am new to all of this so configuring anything server side is a challenge for me to say the least. that being said I have tried the following things based on what I have read to no avail.

Presenting GeoServer on port 80 on a Windows IIS Server

Application Request Routing module and the URL rewrite module on IIS

I have not attempted an open layers proxy since all of those posts seem to come from a few years ago.

I apologize if this is a repeat but to my untrained mind I see several possible solutions and none of them are firing for me.

1

If you do not have to support very old browsers, the easiest way to achieve this is to make the servlet container that your GeoServer runs in (e.g. Tomcat) send CORS headers. A good web site that explains how to set these for all different kinds of servers is http://enable-cors.org.

You may not want to allow cross-domain requests from all hosts, so you could set the value of the Access-Control-Allow-Origin header to the host of your ol3 application instead of '*'. So if your GeoServer runs on myhost.com:8080 and your ol3 app runs on myhost.com:80, your Access-Control-Allow-Origin header's value could be 'myhost.com'.

0

the above worked well for me. following the steps on cors.org I was able to access wmsgetfeatureinfo in openlayers3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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