Instructions for Setting up Machines for the OpenLayers Workshop
================================================================

The OpenLayers workshop requires all software for the GeoServer workshop to be
installed. 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.

Extract the Archive
-------------------

The ol_workshop.zip archive should be extracted somewhere accessible on the
workshop machines. Participants are expected to navigate to this directory, open
a text editor, and save files in the directory.

The structure should look like the this:

ol_workshop/
    data/
        layers/
            f4g_presenters.json
    doc/
        ...
    ext/
        ...
    extras/
        ...
    jquery-ui/
        ...
    openlayers/
        ...

Modify the Apache Config
------------------------

Users are expected to be able to access the following locations:

 * http://localhost/ol_workshop (the directory mentioned above)
 * http://localhost/geoserver (GeoServer when it is running)
 
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
    </Directory>

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

Proxy GeoServer on port 80
~~~~~~~~~~~~~~~~~~~~~~~~~~

Include the following in the Apache config:

    ProxyRequests Off
    ProxyPreserveHost On

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    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 services first as necessary):

    1. Load http://localhost/geoserver/ in a browser. You should see GeoServer's
    welcome screen with three green bars on the left.
    
    2. Navigate to the layers preview page. You should be able to see the
    medford layer listed in the table. 
    
    3. Click on the OpenLayers preview link
    for the medford layer. You should see some aerial imagery with streets 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.

Thanks!  Please contact me with any issues that come up (tim at opengeo.org).
