[OpenLayers-Users] RV: Ajax problem - Cross Domain?

David Alda Fernandez de Lezea dalda at ikt.es
Thu Mar 18 05:34:19 EDT 2010


Hello,

Thanks for your response. Does this work with IP addresses?

I mean, that I still don't have no www.example.com address for instance.

What do you think about writing a server side proxy (php, asp, whatever)?

P.S. I'm quite newbie in this stuff.

-----Mensaje original-----
De: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] En nombre de Tim Schaub Enviado el: miércoles, 17 de marzo de 2010 22:00
Para: openlayers users
Asunto: Re: [OpenLayers-Users] Ajax problem - Cross Domain?

David Alda Fernandez de Lezea wrote:
> Hello,
> 
> We're developing a library based on OpenLayers (a simple GIS viewer with some special configuration) that will be included in some web applications. These applications will include our library with a script tag in their html code, and the applications are in different servers and domains. Testing a bit all these stuff, we get an error:
> 
> NETWORK_ERR: XMLHttpRequest Exception 101
> 
> This error appears in a function that loads a XML config file synchronously. This XML file is hosted in a server and the code from where is invoked is in another.
> 
> Is this a cross-domain error??
> 
> At first sight I thought it was a cross-domain error and found some suggestions of how to solve it. One of them was very interesting: using apache mod_rewrite module. I decided to give it a try but I think I'm not using it properly. Here is what I put in httpd.conf file:
> 
>  <Directory /ms4w/Apache/htdocs>
>    RewriteEngine on
>    RewriteRule ^vcw/data/IKT_OGC_Services.xml$ 
> http://192.168.1.38/vcw/data/IKT_OGC_Services.xml
>  </Directory>
> 

With mod_proxy, assuming you want to proxy http://example.com/remote/path

<VirtualHost *>

     # ...

     ProxyRequests Off
     # turn the next line off if you are proxying to a NameVirtualHost
     ProxyPreserveHost On

     <Proxy *>
         Order deny,allow
         Allow from all
     </Proxy>

     ProxyPass /local/path http://example.com/remote/path
     ProxyPassReverse /local/path http://example.com/remote/path
     # ...

</VirtualHost>


> Does anybody know how to configure it?
> 
> Some info:
> 
> GIS viewer is in 192.168.1.65
> Apps are in 192.168.1.38
> 
> And I think that they are in different domais.
>  
>  
> Un saludo,
>  
> ······································································
> ············
> 
> David Alda Fernández de Lezea
> Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y 
> Biodiversidad
>  
> IKT
> Granja Modelo s/n · 01192 · Arkaute (Araba)
> 
> ··················································································
> Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
> ··················································································
> email: dalda at ikt.es                                web: www.ikt.es
> ······································································
> ············ _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users


--
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users



More information about the Users mailing list