GeoServer, Openlayers, Windows - Proxy Hell I think?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

GeoServer, Openlayers, Windows - Proxy Hell I think?

bsheehy
I'm using GeoServer to server maps and Openlayers to display them in a .Net Website. Its all installed on Windows Server 2003 with my my site that uses OpenLayers hosted by IIS.I use WFS and WMS services. Even though they are on the same server, I think the different ports 80 for IIs and 8080 for GeoServer constitute different domains.
Do I need to use a Proxy?

Can someone point me to some idiot proof help that shows me how to set this up - because I'm totally lost.
Reply | Threaded
Open this post in threaded view
|

Re: GeoServer, Openlayers, Windows - Proxy Hell I think?

luciano.campagnolo
Hi,
You just need to point your application (.Net Website/OpenLayers) to
consume the services available at 8080 (GeoServer).... then possibly
lock down the use of 8080 to your own server (and thus hide it from
'the wild') using a firewall.

Hope it helps
Luc

On Wed, Sep 28, 2011 at 11:56 AM, bsheehy <[hidden email]> wrote:

> I'm using GeoServer to server maps and Openlayers to display them in a .Net
> Website. Its all installed on Windows Server 2003 with my my site that uses
> OpenLayers hosted by IIS.I use WFS and WMS services. Even though they are on
> the same server, I think the different ports 80 for IIs and 8080 for
> GeoServer constitute different domains.
> Do I need to use a Proxy?
>
> Can someone point me to some idiot proof help that shows me how to set this
> up - because I'm totally lost.
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoServer-Openlayers-Windows-Proxy-Hell-I-think-tp6840514p6840514.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoServer, Openlayers, Windows - Proxy Hell I think?

bsheehy
Thanks for the reply,
I'm no IIS guru - what exactely is required to do this or can you point me to an idiot proof doc\page that details what I have to do.

Whats with the OpenLayers.Proxy - whats the point of this then?
Reply | Threaded
Open this post in threaded view
|

Re: GeoServer, Openlayers, Windows - Proxy Hell I think?

Charles Galpin-2
I don't use IIS, but try this

http://learn.iis.net/page.aspx/659/reverse-proxy-with-url-rewrite-v2-and-application-request-routing/

hth
charles

On Sep 29, 2011, at 7:12 AM, bsheehy wrote:

> Thanks for the reply,
> I'm no IIS guru - what exactely is required to do this or can you point me
> to an idiot proof doc\page that details what I have to do.
>
> Whats with the OpenLayers.Proxy - whats the point of this then?
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoServer-Openlayers-Windows-Proxy-Hell-I-think-tp6840514p6843522.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoServer, Openlayers, Windows - Proxy Hell I think?

bsheehy
Unfortunately I'm using II6 - but thanks.
so many of the articles I read around this issue assume the user know so much. If I ever get this working I'm going to write and idiot proof version of what I did because its been a very frustrating time.
Reply | Threaded
Open this post in threaded view
|

Re: GeoServer, Openlayers, Windows - Proxy Hell I think?

D_Guidi
> so many of the articles I read around this issue assume the user know so
> much. If I ever get this working I'm going to write and idiot proof version
> of what I did because its been a very frustrating time.
Actually it's easy to use this code
http://code.google.com/p/iisproxy/issues/detail?id=8

simply take the code, copy the handler inside your project and use
this hadler as proxyhost in openlayers. no configuration needed.
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoServer, Openlayers, Windows - Proxy Hell I think?

Puneet Kishor
In reply to this post by bsheehy

On Sep 28, 2011, at 9:56 AM, bsheehy wrote:

> I'm using GeoServer to server maps and Openlayers to display them in a .Net
> Website. Its all installed on Windows Server 2003 with my my site that uses
> OpenLayers hosted by IIS.I use WFS and WMS services. Even though they are on
> the same server, I think the different ports 80 for IIs and 8080 for
> GeoServer constitute different domains.
> Do I need to use a Proxy?
>
> Can someone point me to some idiot proof help that shows me how to set this
> up - because I'm totally lost.
>

Other than OpenLayer, I don't use any of the above mentioned technologies (GeoServer, Windows), so I can't help you with the specifics, but I can explain the basics behind what is required and why.

When a user requests a web page from server A, usually everything that the user sees in the browser comes from A. But, because of the nature of www, it doesn't have to. Images, scripts, text all can come from different servers. All was well, until the arrival of Ajax. Ajax allows JavaScript to query servers asynchronously and load more data, manipulate the web page. This is what OpenLayers does.

Because of security reasons (you can search for "cross-site scripting vulnerabilities" to learn more), browsers permit scripts to load data from the same domain where the page originated. So, scripts in your page above, can only load data from server A.

However, your GeoServer is serving data from port 8080, hence, it is really a different server (to the outside world) even if it is running on the same physical server, or even the same web server. So, your JavaScript embedded in a page delivered by server A is trying to request data from server B. That is not allowed.

To get around this, you can use two techniques -- one is called JSONP, and the other is the use of a proxy.

The idea behind a proxy is that your JavaScript will think that it is requesting data from server A, but the proxy will actually request it from B and send it back to the web page.

With the above understanding, you can search around for implementing proxies on Windows, and hopefully go your merry way.

--
Puneet Kishor

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoServer, Openlayers, Windows - Proxy Hell I think?

Dominik Mikiewicz
In reply to this post by Charles Galpin-2
In general IIS will intercept all the (default) traffic unless you make it
not do it. The url-rewrite link mentioned below is a good place to start.
Two things though:
1. If you would like to hide your geoserver and make it inaccessible from
the internet simply call a proxy that then calls your localhost:8080 or
whatever port you set.
2. If you want to make your geoserver visible from the internet though start
playing with the url rewrite as mentioned. We put a little guide - though
specific to our set up - here:
http://cartoninjas.net/post/2011/02/01/GeoServer-production-environment-on-W
indows-Server-with-IIS-and-Apache.aspx it may give you an idea of what may
have to be addressed.

Hope this helps
Dominik

Ps. If you need a proxy - a very basic example of asp.net proxy may also be
found on our blog.

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Charles
Galpin
Sent: Thursday, September 29, 2011 1:19 PM
To: bsheehy
Cc: [hidden email]
Subject: Re: [OpenLayers-Users] Re: GeoServer, Openlayers, Windows - Proxy
Hell I think?

I don't use IIS, but try this

http://learn.iis.net/page.aspx/659/reverse-proxy-with-url-rewrite-v2-and-app
lication-request-routing/

hth
charles

On Sep 29, 2011, at 7:12 AM, bsheehy wrote:

> Thanks for the reply,
> I'm no IIS guru - what exactely is required to do this or can you
> point me to an idiot proof doc\page that details what I have to do.
>
> Whats with the OpenLayers.Proxy - whats the point of this then?
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/GeoServer-Openlayers-Windows-Pr
> oxy-Hell-I-think-tp6840514p6843522.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users