It sounds like you are running afoul of JavaScript's 'same-origin' policy, which requires that XMLHttpRequests made in JavaScript be made to the same host and port as the page was served from. You will need to configure Apache to proxy GeoServer so that clients see the same port number for GeoServer and your static files hosted via Apache. We have a page on the wiki about this:
http://geoserver.org/display/GEOSDOC/How+to+proxy+Jetty+through+Apache+on+port+80
Despite the title, this applies to any servlet container.
Hi Justin,
Yes, I am using OpenLayers as the client to view the maps.
As I mentioned earlier, the geoserver box is behind a server which performs NAT.
Port 8081 on the NAT machine has been mapped to port and 80 on the geoserver box and
port 8082 on the NAT machine has been mapped to port 8080 on the geoserver box.
The web files (php, html) are stored in /var/www folder.
When I access the web files like http://<ip-address>:8081/mymap.php only the WMS layers
are displayed. While the response to the wfs layer request was <urlopen error (111, 'Connection refused')>.
I access geoserver in my javascript as http://<ip-address>:8082/wfs.
Therefore I changed the request parameters on OpenLayers so that the wfs requests would directly access the geoserver box
via the Intranet, (without going through the NAT server) which showed the wfs layers.
Therefore I assumed that some ports that are needed by wfs/geoserver are blocked by the NAT machine.
The only way that I was able to display the wfs layers via the Internet, was by placing my web files in the geoserver/data_dir/www directory.
I have added my ip adress to the proxy.cgi which is requried by OpenLayers.
I would like to have the web files in the /var/www folder. Therefore would I need to map any other ports in the NAT server to the geoserver box, or perform any other configurations to achive this. I am using geoserver 1.6.3. <http://1.6.3.>
Thanks,
Regards,
Indika
2008/12/1 Justin Deoliveira <jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>>
Hi Indika,
It is not exactly clear... what client are you using to access the
GeoServer WFS? You say coping your web files over to data_dir/www
makes things work? Does this mean you are using an OpenLayers map
to access? Or perhaps an html form? Some more info should help us
solve the issue.
-Justin
Indika Tantrigoda wrote:
Hello to all,
I have a geoserver installation working behind a NAT, and the
necessary ports has been
mapped to apache and geoserver (8081--->80 and 8082--->8080).
The WMS layers works fine, however an error occurs with the
WFS layers saying <urlopen error (111, 'Connection refused')>.
Are there any ports other than the ones mentioned above that
must be mapped to geoserver for wfs to work.
My web files are in /var/www. When I copy these to the
data_dir/www folder inside the geoserver wfs works.
(The wfs url must be changed from
<ip-address>:8082:/geoserver/wfs to /geoserver/wfs)
Thanks in advance,
Regards,
Indika
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move
Developer's challenge
Build the coolest Linux based applications with Moblin SDK &
win great prizes
Grand prize is a trip for two to an Open Source event anywhere
in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
<http://moblin-contest.org/redirect.php?banner_id=100&url=/>
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
-- Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users