On 28/07/15 06:51, Jair Santos wrote:
> Hi James and thank you for your response.  AFAIK the web site and geoserver
> can be in different servers. Or didn't I understand your reply?

This is not the problem in this case. Only some types of services (e.g. 
XML) are affected by JavaScript cross-origin rules. Images, such as 
those served by WMS, are not affected. This is what makes it easy to add 
multiple WMS layers from various servers to an OpenLayers map. See:
https://en.wikipedia.org/wiki/Same-origin_policy

OpenLayers can consume WFS services, which *are* affected by the 
same-origin rule, but your example does not use WFS. For WFS, you can 
use a reverse proxy to access the service from JavaScript.

> How am I supposed to run two services in the same port in the same server?
> Could you please clarify?

If you ever need to do this, you can use a proxy that sits in front of 
Tomcat and passes requests to it. Different request paths are dispatched 
to different servers. Apache HTTP Server can do this, and I expect IIS 
can as well. Straightforward to set up, and very useful in production, 
but not needed to fix your current problem. In production, everything 
must be on port 80 or 443 as firewalls typically block everything else.

Kind regards,

-- 
Ben Caradoc-Davies <[email protected]>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to