OpenGeo & terrestris GmbH & Co. KG

OpenLayers Workshop

Table Of Contents

Workshop Setup


These instructions assume that PostgreSQL with PostGIS and GeoServer are installed on workshop machines. These instructions assume that the OpenGeo Suite installer was assumed to install both GeoServer and PostgreSQL. GeoServer and PostgreSQL should be running before starting the workshop. With the Suite install, these services can be started from the Suite Dashboard (on Windows, you’ll also find items in the Start menu.)

Accessing the Tutorial Docs

Extract the somewhere on your system. The path to the extracted directory is referred to as [OL_WORKSHOP] below.

These instructions assume that when GeoServer is started, it will be running on port 8080. Note, if GeoServer does not run on port 8080, change 8080 below to the appropriate port. The instructions also assume that you have an http server (e.g. Apache) running on port 80. The workshop docs use the URL http://localhost/ol_workshop to access the root of the workshop folder and http://localhost/geoserver to access GeoServer.

Set up an alias for /ol_workshop

Include the following in the Apache config:

Alias /ol_workshop "[OL_WORKSHOP]"
<Directory "[OL_WORKSHOP]">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all

Replace [OL_WORKSHOP] with the full path on the filesystem to the ol_workshop directory (extracted from the

Proxy GeoServer on port 80

Include the following in the Apache config:

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
    Order deny,allow
    Allow from all

ProxyPass /geoserver http://localhost:8080/geoserver
ProxyPassReverse /geoserver http:/localhost:8080/geoserver

This requires that mod_proxy is enabled.

Test the Setup

Test GeoServer and Postgres Setup. Start Postgres first and then start GeoServer. After starting both services, the following tests should pass.

1. Load http://localhost/geoserver/ in a browser. You should see GeoServer’s welcome screen.

2. Navigate to the layers preview page. You should be able to see the medford layers listed in the table.

3. Click on the OpenLayers preview link for the medford layer. You should see some elevation data with infrastructure data over it.

Test Workshop Docs:

1. Load http://localhost/ol_workshop/doc/ in a browser. You should see a the intro page for the workshop docs with links to lead you through the workshop.