问题描述
我一直左右为难了好几天,现在我真的AP preciate你的帮助。
这里是我的情况:
- Ubuntu Linux操作系统(所有端口打开)
- Apache的端口8081上运行
- 利用Geoserver Tomcat的端口8080
我试图做一个不同的PC比服务器WFS连接,所以我需要使用代理。
在我的服务器我编辑httpd.conf文件,并添加这些行:
I've been in a dilemma for several days and now I'd really appreciate your help.Here is my situation:- Ubuntu Linux (All ports opened)- Apache running on port 8081- Geoserver Tomcat on port 8080I'm trying to make a WFS connection by a different pc than the server so I need to use a proxy.In my server I edited httpd.conf and added these lines:
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /geoserver http://mydomain.com:8080/geoserver
ProxyPassReverse /geoserver http://mydomain.com:8080/geoserver
我从网上下载的OpenLayers proxy.cgi和编辑加我的允许的主机(本地主机:8081,本地主机,MYDOMAIN:8081等)
当我在Web浏览器中,我转发到网站的OpenLayers开proxy.cgi,所以我认为Python和脚本的正常运行。
然后我说在仪表盘的GeoServer基地代理URL。
在我的HTML我点像Openlayers.js,GeoExt,每个脚本文件的js与港口8081 apache和左右。
里面我init函数我把:
I downloaded proxy.cgi from OpenLayers and edited to add my allowed hosts (localhost:8081, localhost, mydomain:8081, etc.)When I open proxy.cgi in the web browser I'm forwarded to the openlayers site, so I think that python and the script are running correctly.Then I added http://mydomain.com:8081/geoserver to the base proxy URL in geoserver dashboard.In my html I point every script file like Openlayers.js, GeoExt,js to apache so with port 8081.Inside my init function I put:
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
和使用WFS矢量图层是这样的:
and the vector layer with WFS is like this:
var inc2007 = new OpenLayers.Layer.Vector("Inc", {
styleMap: styles1,
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://mydomain.com:8081/geoserver/wfs",
featurePrexif: "Inc",
featureType: "Inc",
featureNS: "http://mydomain.com:8080/Incendi"
}),
});
我不能在地图上看到这一层,萤火虫不会记录。
我试图链接的ProxyHost改为http://mydomain.com:8081/cgi-bin/proxy.cgi?url=,但没有。
我能做什么?
我真的...真的需要你的帮助。
I can't see this layer on the map and firebug doesn't log anything.I tried to change the ProxyHost link to "http://mydomain.com:8081/cgi-bin/proxy.cgi?url=" but nothing.What can I do?I really...really need your help.
在此先感谢您的答复。
推荐答案
通过把对当地阿帕奇proxy.cgi,而不是在阿帕奇驻留在GeoServer的机器上解决...
Solved by putting proxy.cgi on the local apache and not on the apache residing on the geoserver machine...
这篇关于与8081端口进行代理Apache以GeoServer的8080世界粮食首脑会议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!