[mapserver-commits] r12776 - trunk/docs/en/mapcache
svn at osgeo.org
svn at osgeo.org
Wed Nov 16 04:24:15 EST 2011
Author: tbonfort
Date: 2011-11-16 01:24:15 -0800 (Wed, 16 Nov 2011)
New Revision: 12776
Added:
trunk/docs/en/mapcache/sources.txt
Modified:
trunk/docs/en/mapcache/install.txt
trunk/docs/en/mapcache/proxying.txt
Log:
doc work in progress
Modified: trunk/docs/en/mapcache/install.txt
===================================================================
--- trunk/docs/en/mapcache/install.txt 2011-11-15 21:43:41 UTC (rev 12775)
+++ trunk/docs/en/mapcache/install.txt 2011-11-16 09:24:15 UTC (rev 12776)
@@ -121,7 +121,26 @@
http://myserver/fcgi-bin/mapcache/demo supposing your fcgi processes are accessed
under the fcgi-bin alias.
+With a working mod_fcgid apache instance, the full httpd.conf snippet to activate
+mapcache could be:
+.. code-block:: apache
+
+ <IfModule mod_fcgid.c>
+ IPCCommTimeout 120
+ MaxProcessCount 10
+ FcgidInitialEnv "MAPCACHE_CONFIG_FILE" "/Users/tbonfort/dev/mapserver/mapcache/mapcache.xml"
+ <Location /map.fcgi>
+ Order Allow,Deny
+ Allow from all
+ SetHandler fcgid-script
+ </Location>
+ ScriptAlias /map.fcgi "/Users/tbonfort/dev/mapserver/mapcache/src/mapcache"
+ </IfModule>
+
+The mapcache service would then be accessible at http://myserver/map.fcgi[/demo]
+
+
Customizing the build, or if something went wrong
-------------------------------------------------
Modified: trunk/docs/en/mapcache/proxying.txt
===================================================================
--- trunk/docs/en/mapcache/proxying.txt 2011-11-15 21:43:41 UTC (rev 12775)
+++ trunk/docs/en/mapcache/proxying.txt 2011-11-16 09:24:15 UTC (rev 12776)
@@ -7,6 +7,10 @@
:Author: Thomas Bonfort
:Contact: tbonfort at terriscope.fr
+.. note::
+
+ This page is a work in progress
+
MapCache has the ability to forward any incoming request that it cannot
natively respond to (either by returning a tile directly, by :ref:`merging
<mapcache_tile_assembling>` multiple tiles, etc...).
@@ -21,4 +25,81 @@
The proxying of requests is configured inside the :ref:`WMS <mapcache_wms>`
MapCache service, which is semantically awkward.
-TBD
+The configuration for this behavior is activated by a succession of entries
+inside the <forwarding_rule> element of the wms <service>. Rules are tested
+for in the order in which they appear in the mapcache.xml configuration file,
+and the first one that matches is used. If no rules are defined, or if no
+rule matches the incoming request, an error is returned to the user.
+
+.. code-block:: xml
+ <service type="wms" enabled="true">
+ <forwarding_rule name="first rule">
+ <!-- rule tests -->
+ <!-- proxy destination -->
+ </forwarding_rule>
+ <forwarding_rule name="second rule">
+ <!-- rule tests -->
+ <!-- proxy destination -->
+ </forwarding_rule>
+ </service>
+
+
+A <forwarding_rule> consists of a set of matching rules and an <http> block
+defining where the request should be forwarded to.
+
+Parameter Filtering
+--------------------------------------------------------------------------------
+
+The rules apply to the KVP parameters that were passed in the incoming request,
+and are added with the <param> keyword:
+
+.. code-block:: xml
+
+ <forwarding_rule name="first rule">
+ <param name="SERVICE" type="values">WFS,WCS</param>
+ <!-- ... !>
+ <forwarding_rule>
+
+The "type" attribute is the same that what is allowed for :ref:`dimensions
+<mapcache_dimensions>`, i.e. allowed values are "values", "regex", and
+"intervals". In the previous example, the rule would match any incoming
+request having ...&SERVICE=WFS&... or ...&SERVICE=WCS&... in its request
+parameters.
+
+.. code-block:: xml
+
+ <forwarding_rule name="first rule">
+ <param name="SERVICE" type="values">WFS,WCS</param>
+ <param name="LAYERS" type="values">somelayername</param>
+ <!-- ... !>
+ <forwarding_rule>
+
+Multiple rules can be used if the filtering has to be done on mutiple
+parameters. In the previous example, the rule would match a WFS or WCS
+request that concerns the "somelayername" layer only.
+
+A <forwarding_rule> that has no <param> child will match any incoming
+request that could not be serviced by MapCache directly from its cache,
+and can be used to forward all unsupported request to a full OGC
+compliant server so that an un-cached response can be returned to the
+client.
+
+.. seealso:: :ref:`mapcache_dimension`
+
+Proxy Destination
+--------------------------------------------------------------------------------
+
+Once a <forwarding_rule> matches, its <http> child will be used to proxy the
+request to another server.
+
+.. code-block:: xml
+
+ <forwarding_rule name="first rule">
+ <!-- ... !>
+ <http>
+ <url>http://wmsserver/ogc.cgi?</url>
+ </http>
+ <forwarding_rule>
+
+.. seealso:: :ref:`mapcache_http`
+
Added: trunk/docs/en/mapcache/sources.txt
===================================================================
--- trunk/docs/en/mapcache/sources.txt (rev 0)
+++ trunk/docs/en/mapcache/sources.txt 2011-11-16 09:24:15 UTC (rev 12776)
@@ -0,0 +1,34 @@
+.. _mapcache_sources:
+
+*****************************************************************************
+Data Sources
+*****************************************************************************
+
+:Author: Thomas Bonfort
+:Contact: tbonfort at terriscope.fr
+
+.. note::
+
+ This page is a work in progress
+
+MapCache uses the concept of a "source" as a service that is able to return
+image data given a set of parameters (namely an extent, an image size, and a
+projection). Typically, a source is the third party WMS server that you want
+to put a tilecache infront of.
+
+
+
+.. _mapcache_http:
+
+HTTP Service Definition
+--------------------------------------------------------------------------------
+
+.. _mapcache_source_wms:
+
+WMS Sources
+--------------------------------------------------------------------------------
+
+.. _mapcache_source_mapfile:
+
+MapFile Sources
+--------------------------------------------------------------------------------
More information about the mapserver-commits
mailing list