从 Internet 从 Amazon E2C 访问 Geoserver

Posted

技术标签:

【中文标题】从 Internet 从 Amazon E2C 访问 Geoserver【英文标题】:Access Geoserver from Amazon E2C from Internet 【发布时间】:2013-06-05 11:30:23 【问题描述】:

需要帮助通过 Internet 访问我在 Amezon E2C 上的 GIS 网站。

我在 Amazon E2C VPC Windows 2008 实例上的 8080 端口上运行 Geoserver,网站使用 openlayer,通过 IIS 托管的 geoext,我的 E2C 有私有 IP 10.#.#.70,我在 openlayer 代码中使用它来引用到 WMS 图层如下。

       parcel_boundary = new OpenLayers.Layer.WMS(
                "GEO:parcel_boundary", "http://10.#.#.70:8080/geoserver/GEO/wms",
                
                    LAYERS: 'GEO:parcel_boundary',
                    STYLES: '',
                    format: 'image/png',
                    tiled: true,
                    tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom
                ,
                
                    buffer: 0,
                    displayOutsideMaxExtent: true,
                    isBaseLayer: false,
                    yx : 'EPSG:32643' : false
                 
            );

我的 E2C 有公共 IP 54.#.#.28,我可以使用 url http://54.#.#.28/WEBGIS/GIS/GIS.html 通过互联网访问我的网站,但我只能使用空白地图查看网站的 Html 和 Geoext 部分,实际上是 WMS 请求到 Geoserver 是 http://10.#.#.70:8080/geoserver/GEO/wms,它不会从 Internet 获取任何有效数据。但在 E2C 服务器上 我可以使用相同的 Url 使用 Map 正确查看站点。

我应该做些什么更改才能通过 Internet url 在我的网站中查看 Wms 图层。 如果我需要代理如何设置它。请帮忙。谢谢。

【问题讨论】:

【参考方案1】:

您的 openlayers 地图从客户端浏览器连接到地理服务器,这意味着您的私有 EC2 IP 对尝试访问地图数据的客户端浏览器是隐藏的。您必须在 Internet 上公开地理服务器(作为您的网站)才能使其工作 - 然后使用您的公共 IP 访问它。

【讨论】:

【参考方案2】:

我在相同的场景中使用 IIS URL 重写。

http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing

http://forums.iis.net/t/1189344.aspx/1

【讨论】:

【参考方案3】:

感谢您的帮助..

问题已解决,这是我在 EC2 上的服务器防火墙问题。我允许端口 8080 的入站和出站异常,现在我可以通过互联网轻松访问我的 url。 :)

如果需要,在以下 URL 中配置防火墙规则的步骤。 ttp://www.2x.com/blog/2010/04/tech/configuring-the-windows-server-2008-r2-firewall-to-open-ports-for-2x-solutions/

【讨论】:

以上是关于从 Internet 从 Amazon E2C 访问 Geoserver的主要内容,如果未能解决你的问题,请参考以下文章

是否可以从 Amazon Aurora 迁移回 Amazon RDS 中的原生 MySQL?

将数据从 Amazon redshift 卸载到 Amazon s3

AWS:将日志从 Amazon CloudWatch 导出到 Amazon Redshift

从Amazon的DevOps到AWS的崛起

通过 iframe 上传 Amazon S3

如何从我的 Amazon EC2 实例中连接到 Amazon Redshift 集群