Complete List of Configuration ElementsΒΆ

The example below uses all configuration directives that are currently available in GeoWebCache. Some of them a mutually exclusive, please check the XSD documentation. Additionally, certain global settings are controlled through the Spring context in geowebcache-servlet.xml.

<?xml version="1.0" encoding="utf-8"?>
<gwcConfiguration xmlns:xsi=""

  <!-- ============================== GLOBAL SETTINGS ======================================== -->

  <!-- The following controls certain automatic upgrades. Update this and the namespaces above when
       you update the configuration file manually -->
  <!-- OPTIONAL This is the global timeout for HTTP connections to WMS backends. It is used both for the
       connection and the transfer, so the actual timeout may be much longer if the data is
       trickling back slowly. -->
  <!-- OPTIONAL If the following is set to true you can append cached=false to requests and they will be
       proxied without caching. -->
  <!-- OPTIONAL By default GWC displays simple runtime statistics on the front page -->
  <!-- OPTIONAL A HTTP username to use for requests. Due to the design of the HTTP client included with
       Java this setting is global-->
  <!-- OPTIONAL Password for the username above -->

  <!-- ============================== GLOBAL FORMAT MODIFIERS ================================ -->

  <!-- OPTIONAL Format modifiers. These can also be defined per layer -->
    <!-- You can have one or more of these elements -->
      <!-- REQUIRED This format modifier applies to JPEGs -->
      <!-- OPTIONAL PNG images are requested from the backend to avoid double compression -->
      <!-- OPTIONAL For request formats that support it  -->
      <!-- OPTIONAL Background color -->
      <!-- OPTIONAL Palette used on WMS server -->
      <!-- OPTIONAL Tune the compression level, 1.0 is best quality -->

  <!-- ============================== GRID SETS ============================================= -->

  <!-- OPTIONAL Grid Sets. If you do not define any here, the only ones available will be
       worldwide EPSG:4326 and EPSG:900913, in addition to any that are automatically
       generated for the GetCapabilities configuration -->
    <!-- You can have one or more of these elements -->
      <!-- REQUIRED The name should imply something about use, extent or SRS -->
      <name>The Entire World</name>
      <!-- REQUIRED The SRS used for WMS requests. This is all the fallback lookup
           method for services that do not specify the grid set. Currently only
           EPSG codes are allowed, so you specify the number.
      <!-- REQUIRED The bounding box for the grid set. See the Grid Set documentation
           regarding how this is interpreted and adjusted. You should set this to the
           maximum values for which the given SRS is valid, you will limit it with
           gridSubset elements further down -->
      <!-- OPTIONAL Whether the grid should have a fixed top left origin. The default
           is to use the bottom left -->
      <!-- OPTIONAL (CHOICE) By default GWC tries to fit the extent into a single tile and then
           quarters this tile for every subsequent zoom level. Instead you can specify
           specific resolutions that are uniformly decreasing. Resolution is calculated
           as map degrees per pixel. So 180 degrees / 256 pixel = 0.703125 -->
      <!-- OPTIONAL (CHOICE) Alternatively, you can use scale denominators, calculated in the
           OGC fashion of assuming one pixel = 0.28mm. The numbers must be uniformly
           increasing. -->
      <!-- OPTIONAL (CHOICE) If quartering is good enough, but you wish to limit the number of
           zoom levels, you can do so by defining the number of levels -->
      <!-- OPTIONAL The value of "1 map unit" in real world meters. This value is
       used for approximate scale calculations and is usually not very accurate.
       For lat/lon you should use (earth circumference) / 360.0 degrees = 111226.31
       For feet you use 0.3048 , and so forth
      <!-- OPTIONAL The size of a single pixel in meters. OGC standards such as WMS 1.3.0 and
           WMTS assume 0.28mm per pixel, which corresponds to 90.72 DPI
      <!-- OPTIONAL Some protocols, such as WMTS, support named scales. If desired you
           can define the names here, be sure to keep the same order as in the scale or
           resolution definition -->
        <string>Low Resolution</string>
        <string>Medium Resolution</string>
        <string>High Resolution</string>
      <!-- OPTIONAL Specify the tile height, in pixels -->
      <!-- OPTIONAL Specify the tile width, in pixels -->

  <!-- ============================== LAYERS ============================================== -->

      <!-- REQUIRED The name that clients should use to request this layer.
           Unlike WMS, it can contain commas, in case you want to combine a group -->
      <name>Some Layer</name>
      <!-- OPTIONAL Specify the formats that are supported by this layer.
           By default, image/png and image/jpeg are supported. Other options include
           image/png; mode=24bit, image/png24, image/png8, image/tiff, image/gif
      <!-- OPTIONAL See the global setting with the same name -->
      <!-- OPTIONAL By default a layer will be valid for all of EPSG:4326 and EPSG:900913.
           This behavior is disabled if you specify a gridSubset, and this also allows
           you to specify that this layer is only valid for a subset of the grid -->
          <!-- REQUIRED The name of the grid set for which this layer is valid
               "EPSG:4326" and "EPSG:900913" are valid by default, but this
               example shows how to refer to the grid set definition we created
          <gridSetName>The Entire World</gridSetName>
          <!-- OPTIONAL The bounding box for the grid subset. See the Grid Set documentation
               regarding how this is interpreted and adjusted. You should set this to the
               tightest bounds that cover your layer. If not specified, it is assumed that
               this subset covers the entire set. -->
          <!-- OPTIONAL The first zoom level for which this layer is valid,
               given as the zero-based index of the resolution / scaledenominator array -->
          <!-- OPTIONAL The last zoom level for which this layer is valid,
               given as the zero-based index of the resolution / scaledenominator array -->
      <!-- OPTIONAL (TODO, see XSD documentation) -->
      <!-- REQUIRED One or more URLs to the WMS service to be used as backend -->
      <!-- OPTIONAL The LAYERS= value to be sent to the backend server.
           If not specified, the name of this layer element is used. -->
      <!-- OPTIONAL The STYLES= value to be sent to the backend server.
           If not specified, an empty string is used -->
      <!-- OPTIONAL The metatiling factors used for this layer
           If not specified, 3x3 metatiling is used for image formats -->
      <!-- OPTIONAL The gutter is specified in pixels and represents extra padding
           around the image that is sliced away when the tiles are created.

           Certain WMS server have edge effects that can be elimited this
           way, but it can also result in labels being cut off -->
      <!-- OPTIONAL The EXCEPTION= value to be sent to the backend server.
           You can also use vnd.ogc.se_inimage, but in that case GWC will
           be unable to distinguish an error from a valid tile. -->
      <!-- OPTIONAL The VERSION= value to be sent to the backend server.
           The default is 1.1.0 -->
      <!-- OPTIONAL The TILED= value to be sent to the backend server.
           Should normally be omitted -->
      <!-- OPTIONAL The TRANSPARENT= value to be sent to the backend server.
           This is normally set to true, but is not good for JPEG.
           See formatModifiers. -->
      <!-- OPTIONAL The background color specified in hexadecimal
           Note that bgColor and transparent are mutually exclusive -->
      <!-- OPTIONAL The PALETTE= value to be sent to the backend server.
           This parameter is usually omitted -->
      <!-- OPTIONAL Any other parameters that should be sent with every
           request to the backend server. If needed, values should be
           URL escaped in the string below and separated by &amp;

           A typical parameter is the map= value in MapServer.

           This parameter is usually left blank -->
      <!-- OPTIONAL The number of seconds a tile remains valid on the
           server. Subsequent requests will result in a new tile being fetched.
           The default is to cache forever. -->
        <expirationRule minZoom="0"  expiration="14400" />
        <expirationRule minZoom="10" expiration="7200" />
      <!-- OPTIONAL The number of seconds that a client should cache
           a tile it has received from GWC. The default is to use the same
           expiration time as the WMS server provided. If this value is
           not available, 2 hours is used. -->
        <expirationRule minZoom="0" expiration="7200" />
        <expirationRule minZoom="10" expiration="600" />
      <!-- OPTIONAL See the global backendTimeout description -->
      <!-- OPTIONAL Whether clients can append &cached=false and thereby use
           GWC as a proxy or service translator -->
      <!-- OPTIONAL Whether this layer will represent itself as queryable
           in the getcapabilities document, and proxy getfeatureinfo requests
           to the backend server. The default is false. -->
      <!-- OPTIONAL (TODO, see XSD documentation) -->