Changeset 2517

Show
Ignore:
Timestamp:
11/07/03 10:44:40 (5 years ago)
Author:
dan
Message:

Replaced tabs with spaces

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/branch-4-0/mapserver_docs/wms-server-howto.xml

    r2273 r2517  
    44<!-- $Id$ --> 
    55<article> 
    6        <articleinfo> 
    7                <title>Mapserver WMS Server HOWTO - Version 4.0</title> 
    8                <author> 
    9                        <firstname>Jeff</firstname> 
    10                        <surname>McKenna</surname> 
    11                        <affiliation> 
    12                                <orgname>DM Solutions Group Inc.</orgname> 
    13                                <address> 
    14                                        <email>mckenna@dmsolutions.ca</email> 
    15                                </address> 
    16                        </affiliation> 
    17                </author> 
    18                <date>2003-07-29</date> 
    19                <abstract> 
    20                        <!-- a short description of the contents of the doc --> 
    21                        <para> 
     6  <articleinfo> 
     7    <title>Mapserver WMS Server HOWTO - Version 4.0</title> 
     8    <author> 
     9      <firstname>Jeff</firstname> 
     10      <surname>McKenna</surname> 
     11      <affiliation> 
     12        <orgname>DM Solutions Group Inc.</orgname> 
     13        <address> 
     14          <email>mckenna@dmsolutions.ca</email> 
     15        </address> 
     16      </affiliation> 
     17    </author> 
     18    <date>2003-07-29</date> 
     19    <abstract> 
     20      <!-- a short description of the contents of the doc --> 
     21      <para> 
    2222                 This document describes the procedures for setting up an OGC compliant Web Map Server (WMS) through 
    2323          the use of MapServer v3.5 (and later).   
    2424      </para> 
    25                        <para>Last Updated: 07/29/2003</para> 
    26                </abstract> 
    27        </articleinfo> 
    28        <sect1 id="intro"> 
    29                <title>Introduction</title> 
    30                <para> 
     25      <para>Last Updated: 07/29/2003</para> 
     26    </abstract> 
     27  </articleinfo> 
     28  <sect1 id="intro"> 
     29    <title>Introduction</title> 
     30    <para> 
    3131            A WMS (or Web Map Server) allows for use of data from several different servers, and enables for the creation of a 
    3232        network of Map Servers from which clients can build customized maps.   
     
    3434                Open GIS Consortium's (OGC) Web Map Server Interfaces Implementation Specification v1.1.0</ulink>.  
    3535    </para> 
    36                <para> 
     36    <para> 
    3737      MapServer v3.5 or more recent is required to implement WMS features.  At the time this document was written, Mapserver 
    3838         supports the following WMS versions: 1.0.0, 1.0.7, and 1.1.0 (a.k.a. 1.0.8). 
    3939    </para> 
    40                <para> 
     40    <para> 
    4141             This document assumes that you are already familiar with certain aspects of MapServer: 
    4242          </para> 
    43                <itemizedlist> 
    44                        <listitem> 
    45                                <para> 
     43    <itemizedlist> 
     44      <listitem> 
     45        <para> 
    4646                      MapServer application development and setting up .map files.  
    4747                </para> 
    48                        </listitem> 
    49                        <listitem> 
    50                                <para> 
     48      </listitem> 
     49      <listitem> 
     50        <para> 
    5151          Familiarity with the WMS spec would be an asset. A link to the WMS specification document is included in 
    5252          the <link linkend="links">"WMS-Related Information"</link> section below. 
    5353        </para> 
    54                        </listitem> 
    55                </itemizedlist> 
    56                <sect2 id="howitworks"> 
    57                        <title>How does a WMS Work</title> 
    58                        <para> 
     54      </listitem> 
     55    </itemizedlist> 
     56    <sect2 id="howitworks"> 
     57      <title>How does a WMS Work</title> 
     58      <para> 
    5959        WMS servers interact with their clients via the HTTP protocol.  In most cases, 
    6060        a WMS server is a CGI program.  This is also the case with MapServer.      
    6161      </para> 
    62                        <para> 
     62      <para> 
    6363        The WMS specification defines a number of request types, and for each of  
    6464        them a set of query parameters and associated behaviors.  A WMS-compliant  
    6565        server MUST be able to handle at least the following 2 types of WMS requests: 
    6666      </para> 
    67                        <orderedlist> 
    68                                <listitem> 
    69                                        <para> 
    70                                                <emphasis>GetCapabilities:</emphasis> return an XML document with metadata of the Web Map 
     67      <orderedlist> 
     68        <listitem> 
     69          <para> 
     70            <emphasis>GetCapabilities:</emphasis> return an XML document with metadata of the Web Map 
    7171            Server's information       
    7272          </para> 
    73                                </listitem> 
    74                                <listitem> 
    75                                        <para> 
    76                                                <emphasis>GetMap:</emphasis> return an image of a map according to the user's needs. 
    77           </para> 
    78                                </listitem> 
    79                        </orderedlist> 
    80                        <para> 
     73        </listitem> 
     74        <listitem> 
     75          <para> 
     76            <emphasis>GetMap:</emphasis> return an image of a map according to the user's needs. 
     77          </para> 
     78        </listitem> 
     79      </orderedlist> 
     80      <para> 
    8181        And support for the following types is optional: 
    8282      </para> 
    83                        <orderedlist continuation="continues"> 
    84                                <listitem> 
    85                                        <para> 
    86                                                <emphasis>GetFeatureInfo:</emphasis> return info about feature(s) at a query (mouse click)  
     83      <orderedlist continuation="continues"> 
     84        <listitem> 
     85          <para> 
     86            <emphasis>GetFeatureInfo:</emphasis> return info about feature(s) at a query (mouse click)  
    8787              location.  MapServer supports 3 types of responses to this request: 
    8888          </para> 
    89                                        <orderedlist> 
    90                                                <listitem> 
    91                                                        <para> 
     89          <orderedlist> 
     90            <listitem> 
     91              <para> 
    9292                  Text/plain output with attribute info. 
    9393              </para> 
    94                                                </listitem> 
    95                                                <listitem> 
    96                                                        <para> 
     94            </listitem> 
     95            <listitem> 
     96              <para> 
    9797                  Text/html output using MapServer query templates specified in the CLASS template parameter. 
    9898                  The MIME type returned by the Class templates defaults to text/html and can be controlled using the 
    9999                  metadata  <link linkend="mime_type">"wms_feature_info_mime_type"</link>. 
    100100              </para> 
    101                                                </listitem> 
    102                                                <listitem> 
    103                                                        <para> 
     101            </listitem> 
     102            <listitem> 
     103              <para> 
    104104                Gml features. 
    105105              </para> 
    106                                                </listitem> 
    107                                        </orderedlist> 
    108                                </listitem> 
    109                                <listitem> 
    110                                        <para> 
    111                                                <emphasis>DescribeLayer:</emphasis> return an XML description of one or more map layers.  This 
     106            </listitem> 
     107          </orderedlist> 
     108        </listitem> 
     109        <listitem> 
     110          <para> 
     111            <emphasis>DescribeLayer:</emphasis> return an XML description of one or more map layers.  This 
    112112                applies only to SLD WMS servers and is not currently supported by  
    113113                MapServer. 
    114114          </para> 
    115                                </listitem> 
    116                        </orderedlist> 
    117                        <para> 
     115        </listitem> 
     116      </orderedlist> 
     117      <para> 
    118118        With respect to MapServer specifically, it is the "mapserv" CGI program that 
    119119        knows how to handle WMS requests.  So setting up a WMS server with MapServer 
     
    121121        appropriate metadata in it.  This is covered in the rest of this document. 
    122122      </para> 
    123                </sect2> 
    124                <sect2 id="links"> 
    125                        <title>Links to WMS-Related Information</title> 
    126                        <itemizedlist> 
    127                                <listitem> 
    128                                        <para> 
     123    </sect2> 
     124    <sect2 id="links"> 
     125      <title>Links to WMS-Related Information</title> 
     126      <itemizedlist> 
     127        <listitem> 
     128          <para> 
    129129            The Mapserver WMS Client HOWTO: 
    130130            <ulink url="http://mapserver.gis.umn.edu/doc/wms-client-howto.html"> 
    131131            http://mapserver.gis.umn.edu/doc/wms-client-howto.html</ulink> 
    132                                        </para> 
    133                                </listitem> 
    134                                <listitem> 
    135                                        <para> 
     132          </para> 
     133        </listitem> 
     134        <listitem> 
     135          <para> 
    136136            Open GIS Consortium (OGC) Home Page: 
    137137              <ulink url="http://www.opengis.org/">http://www.opengis.org/</ulink> 
    138                                        </para> 
    139                                </listitem> 
    140                                <listitem> 
    141                                        <para> 
     138          </para> 
     139        </listitem> 
     140        <listitem> 
     141          <para> 
    142142            WMS 1.0.0 specification: 
    143143              <ulink url="http://www.opengis.org/techno/specs/00-028.pdf"> 
    144144            http://www.opengis.org/techno/specs/00-028.pdf</ulink> 
    145                                        </para> 
    146                                </listitem> 
    147                                <listitem> 
    148                                        <para> 
     145          </para> 
     146        </listitem> 
     147        <listitem> 
     148          <para> 
    149149            WMS 1.1.0 specification: 
    150150              <ulink url="http://www.opengis.org/techno/specs/01-047r2.pdf"> 
    151151            http://www.opengis.org/techno/specs/01-047r2.pdf</ulink> 
    152                                        </para> 
    153                                </listitem> 
    154                                <listitem> 
    155                                        <para> 
     152          </para> 
     153        </listitem> 
     154        <listitem> 
     155          <para> 
    156156            WMS-Dev mailing list and archive: 
    157157              <ulink url="http://www.intl-interfaces.net/mailman/listinfo/wms-dev"> 
    158158            http://www.intl-interfaces.net/mailman/listinfo/wms-dev</ulink> 
    159                                        </para> 
    160                                </listitem> 
    161                                <listitem> 
    162                                        <para> 
     159          </para> 
     160        </listitem> 
     161        <listitem> 
     162          <para> 
    163163            WMS FAQ: 
    164164              <ulink url="http://www.intl-interfaces.net/cookbook/WMS/faq/faqw.py?req=home"> 
    165165            http://www.intl-interfaces.net/cookbook/WMS/faq/faqw.py?req=home</ulink> 
    166                                        </para> 
    167                                </listitem> 
    168                                <listitem> 
    169                                        <para> 
     166          </para> 
     167        </listitem> 
     168        <listitem> 
     169          <para> 
    170170            WMS XML Capabilities validator: 
    171171              <ulink url="http://www.digitalearth.gov/wmt/xml/validator.html"> 
    172172            http://www.digitalearth.gov/wmt/xml/validator.html</ulink> 
    173                                        </para> 
    174                                </listitem> 
    175                                <listitem> 
    176                                        <para> 
     173          </para> 
     174        </listitem> 
     175        <listitem> 
     176          <para> 
    177177            WMS Cookbook: 
    178178              <ulink url="http://www.intl-interfaces.net/cookbook/WMS/"> 
    179179            http://www.intl-interfaces.net/cookbook/WMS/</ulink> 
    180                                        </para> 
    181                                </listitem> 
    182                        </itemizedlist> 
    183                </sect2> 
    184        </sect1> 
    185        <!-- Section1: Integration or developing  an application--> 
    186        <sect1 id="settingup"> 
    187                <title>Setting Up a WMS Server Using Mapserver</title> 
    188                <sect2 id="install"> 
    189                        <title>Install the Required Software</title> 
    190                        <para> 
     180          </para> 
     181        </listitem> 
     182      </itemizedlist> 
     183    </sect2> 
     184  </sect1> 
     185  <!-- Section1: Integration or developing  an application--> 
     186  <sect1 id="settingup"> 
     187    <title>Setting Up a WMS Server Using Mapserver</title> 
     188    <sect2 id="install"> 
     189      <title>Install the Required Software</title> 
     190      <para> 
    191191        WMS requests are handled by the "mapserv" CGI program.  Not all versions of the 
    192192        mapserv program do include WMS support (it is included by default when you  
     
    195195        use the "-v" command-line switch and look for "SUPPORTS=WMS_SERVER". 
    196196      </para> 
    197                        <example> 
    198                                <title>On Unix:</title> 
    199                                <programlisting> 
     197      <example> 
     198        <title>On Unix:</title> 
     199        <programlisting> 
    200200   $ ./mapserv -v 
    201201   MapServer version 3.5 (pre-alpha) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP  
     
    203203   INPUT=GDAL INPUT=SHAPEFILE        
    204204        </programlisting> 
    205                        </example> 
    206                        <example> 
    207                                <title>On Windows:</title> 
    208                                <programlisting> 
     205      </example> 
     206      <example> 
     207        <title>On Windows:</title> 
     208        <programlisting> 
    209209   C:\apache\cgi-bin> mapserv -v 
    210210   MapServer version 3.5 (pre-alpha) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
     
    212212   INPUT=GDAL INPUT=SHAPEFILE 
    213213        </programlisting> 
    214                        </example> 
    215                </sect2> 
    216                <sect2 id="mapfile"> 
    217                        <title>Setup a Mapfile For Your WMS</title> 
    218                        <para> 
     214      </example> 
     215    </sect2> 
     216    <sect2 id="mapfile"> 
     217      <title>Setup a Mapfile For Your WMS</title> 
     218      <para> 
    219219        Each instance of WMS server that you setup needs to have its own mapfile. 
    220220        It is just a regular MapServer mapfile in which some parameters and some  
     
    222222        to produce a valid GetCapabilites output. 
    223223      </para> 
    224                        <para> 
     224      <para> 
    225225        Here is the list of parameters and metadata items that usually optional with 
    226226        MapServer, but are required (or strongly recommended) for a WMS configuration: 
    227227      </para> 
    228                        <para> 
     228      <para> 
    229229        At the map level: 
    230230      </para> 
    231                        <itemizedlist> 
    232                                <listitem> 
    233                                        <para> 
     231      <itemizedlist> 
     232        <listitem> 
     233          <para> 
    234234            Map NAME 
    235235          </para> 
    236                                </listitem> 
    237                                <listitem> 
    238                                        <para> 
     236        </listitem> 
     237        <listitem> 
     238          <para> 
    239239            Map PROJECTION 
    240240          </para> 
    241                                </listitem> 
    242                                <listitem> 
    243                                        <para> 
     241        </listitem> 
     242        <listitem> 
     243          <para> 
    244244            Map Metadata (in the WEB Object): 
    245245          </para> 
    246                                        <itemizedlist> 
    247                                                <listitem> 
    248                                                        <para> 
     246          <itemizedlist> 
     247            <listitem> 
     248              <para> 
    249249                wms_title 
    250250              </para> 
    251                                                </listitem> 
    252                                                <listitem> 
    253                                                        <para> 
     251            </listitem> 
     252            <listitem> 
     253              <para> 
    254254                wms_onlineresource 
    255255              </para> 
    256                                                </listitem> 
    257                                                <listitem> 
    258                                                        <para> 
     256            </listitem> 
     257            <listitem> 
     258              <para> 
    259259                wms_srs (unless PROJECTION object is defined using "init=epsg:...") 
    260260              </para> 
    261                                                </listitem> 
    262                                        </itemizedlist> 
    263                                </listitem> 
    264                        </itemizedlist> 
    265                        <para> 
     261            </listitem> 
     262          </itemizedlist> 
     263        </listitem> 
     264      </itemizedlist> 
     265      <para> 
    266266        And for each layer: 
    267267      </para> 
    268                        <itemizedlist> 
    269                                <listitem> 
    270                                        <para> 
     268      <itemizedlist> 
     269        <listitem> 
     270          <para> 
    271271            Layer NAME 
    272272          </para> 
    273                                </listitem> 
    274                                <listitem> 
    275                                        <para> 
     273        </listitem> 
     274        <listitem> 
     275          <para> 
    276276            Layer PROJECTION 
    277277          </para> 
    278                                </listitem> 
    279                                <listitem> 
    280                                        <para> 
     278        </listitem> 
     279        <listitem> 
     280          <para> 
    281281            Layer Metadata 
    282282          </para> 
    283                                        <itemizedlist> 
    284                                                <listitem> 
    285                                                        <para> 
     283          <itemizedlist> 
     284            <listitem> 
     285              <para> 
    286286                wms_title 
    287287              </para> 
    288                                                </listitem> 
    289                                                <listitem> 
    290                                                        <para> 
     288            </listitem> 
     289            <listitem> 
     290              <para> 
    291291                wms_srs (optional since the layers inherit the map's SRS value) 
    292292              </para> 
    293                                                </listitem> 
    294                                        </itemizedlist> 
    295                                </listitem> 
    296                        </itemizedlist> 
    297                        <para> 
     293            </listitem> 
     294          </itemizedlist> 
     295        </listitem> 
     296      </itemizedlist> 
     297      <para> 
    298298        Let's go through each of these paramters in more detail: 
    299299      </para> 
    300                        <itemizedlist> 
    301                                <listitem> 
    302                                        <para> 
     300      <itemizedlist> 
     301        <listitem> 
     302          <para> 
    303303            Map Name and wms_title: 
    304304          </para> 
    305                                        <para> 
     305          <para> 
    306306            WMS Capabilities requires a Name and a Title tag for every layer.  The 
    307307              Map's NAME and wms_title metadata will be used to set the root layer's 
     
    309309              WMS context corresponds to the whole mapfile. 
    310310          </para> 
    311                                </listitem> 
    312                                <listitem> 
    313                                        <para> 
     311        </listitem> 
     312        <listitem> 
     313          <para> 
    314314            Layer Name and wms_title metadata: 
    315315          </para> 
    316                                        <para> 
     316          <para> 
    317317            Every individual layer needs its own unique name and title. 
    318318              Layer names are also used in GetMap and GetFeatureInfo requests to refer 
    319319              to layers that should be included in the map output and in the query. 
    320320          </para> 
    321                                </listitem> 
    322                                <listitem id="projection_srs"> 
    323                                        <para> 
     321        </listitem> 
     322        <listitem id="projection_srs"> 
     323          <para> 
    324324            Map PROJECTION and wms_srs metadata: 
    325325          </para> 
    326                                        <para> 
     326          <para> 
    327327            WMS servers have to advertise the projection in which they are able to 
    328328              serve data using EPSG projection codes (see  
     
    331331              Recent versions of the PROJ4 library come with a table of EPSG  
    332332              initialization codes and allow users to define a projection like this:                    </para> 
    333                                        <programlisting> 
     333          <programlisting> 
    334334   PROJECTION 
    335335      "init=epsg:4269" 
     
    345345            element of WMS capabilities, but it is good practice to allow MapServer to include it when possible. 
    346346          </para> 
    347                                        <para> 
     347          <para> 
    348348            The above is sufficient for MapServer to recognize the EPSG code and 
    349349              include it in SRS tags in the capabilities output (wms_srs metadata is not 
     
    354354              definition of the data's projection. 
    355355          </para> 
    356                                        <para> 
     356          <para> 
    357357            Here is an example of a server whose data is in an Lambert Conformal Conic 
    358358              projection (for which there is no EPSG code).  It's capabilities output 
     
    360360              PROJECTION object is set to the real projection that the data is in: 
    361361          </para> 
    362                                        <programlisting> 
     362          <programlisting> 
    363363   NAME DEMO 
    364364   ... 
     
    383383   ... 
    384384          </programlisting> 
    385                                </listitem> 
    386                                <listitem> 
    387                                        <para> 
     385        </listitem> 
     386        <listitem> 
     387          <para> 
    388388            Layer PROJECTION and wms_srs metadata: 
    389389          </para> 
    390                                        <para> 
     390          <para> 
    391391            By default in the WMS context, layers inherit the SRS or their parent layer 
    392392              (the map's projection in the MapServer case).  For this reason it is not 
     
    394394              for every layer. 
    395395          </para> 
    396                                        <para> 
     396          <para> 
    397397            However, if your server wants to advertise multiple projections, then at least 
    398398              a PROJECTION object is required in every layer, otherwise the layers won't 
     
    400400              MapServer. 
    401401          </para> 
    402                                        <para> 
     402          <para> 
    403403            Layer PROJECTION and wms_srs metadata are defined exactly the same way as 
    404404              the map's PROJECTION and wms_srs metadata. 
     
    410410            element of WMS capabilities, but it is good practice to allow MapServer to include it when possible. 
    411411          </para> 
    412                                </listitem> 
    413                                <listitem id="wms_onlineresource"> 
    414                                        <para> 
     412        </listitem> 
     413        <listitem id="wms_onlineresource"> 
     414          <para> 
    415415            The "wms_onlineresource" metadata: 
    416416          </para> 
    417                                        <para> 
     417          <para> 
    418418            The wms_onlineresource metadata is set in the map's web object metadata and 
    419419              specifies the URL that should be used to access your server.  This is 
     
    423423              recommended that you provide the wms_onlineresource metadata. 
    424424          </para> 
    425                                        <para> 
     425          <para> 
    426426            See section 6.2.1 of the <ulink url="http://www.opengis.org/techno/specs/01-047r2.pdf"> 
    427427            WMS 1.1.0 specification</ulink> for the whole story about 
     
    430430              parameter, and and terminated by "?" or "&amp;". 
    431431          </para> 
    432                                        <para> 
     432          <para> 
    433433            Here is a valid online resource URL: 
    434434          </para> 
    435                                        <programlisting> 
     435          <programlisting> 
    436436   http://my.host.com/cgi-bin/mapserv?map=mywms.map&amp; 
    437437          </programlisting> 
    438                                        <para> 
     438          <para> 
    439439            By creating a wrapper script on the server it is possible to hide the  
    440440              "map=" parameter from the URL and then your server's online resource  
    441441              URL could be something like: 
    442442          </para> 
    443                                        <programlisting> 
     443          <programlisting> 
    444444   http://my.host.com/cgi-bin/mywms? 
    445445          </programlisting> 
    446                                        <para> 
     446          <para> 
    447447            This is covered in more detail in the section <link linkend="onlineresourceurl"> 
    448448            "More About the Online Resource URL"</link> below. 
    449449          </para> 
    450                                </listitem> 
    451                        </itemizedlist> 
    452                </sect2> 
    453                <sect2 id="test"> 
    454                        <title>Test Your WMS Server</title> 
    455                        <sect3 id="val_capabilities"> 
    456                                <title>Validate the Capabilities Metadata</title> 
    457                                <para> 
     450        </listitem> 
     451      </itemizedlist> 
     452    </sect2> 
     453    <sect2 id="test"> 
     454      <title>Test Your WMS Server</title> 
     455      <sect3 id="val_capabilities"> 
     456        <title>Validate the Capabilities Metadata</title> 
     457        <para> 
    458458          OK, now that we've got a mapfile, we have to check the XML capabilities  
    459459          returned by our server to make sure nothing is missing. 
    460460        </para> 
    461                                <para> 
     461        <para> 
    462462          Using a web browser, access your server's online resource URL to which you 
    463463          add the parameter "REQUEST=GetCapabilities" to the end, e.g. 
    464464        </para> 
    465                                <programlisting> 
     465        <programlisting> 
    466466   http://my.host.com/cgi-bin/mapserv?map=mywms.map&amp;REQUEST=GetCapabilities 
    467467        </programlisting> 
    468                                <para> 
     468        <para> 
    469469          This should return a document of MIME type application/vnd.ogc.wms_xml, so  
    470470          your browser is likely going to prompt you to save the file.  Save it and  
    471471          open it in a text editor (Emacs, Notepad, etc.) 
    472472        </para> 
    473                                <para> 
     473        <para> 
    474474          If you get an error message in the XML output then take necessary actions.   
    475475          Common problems and solutions are listed in the <link linkend="FAQ">FAQ</link> at the end of this  
    476476          document. 
    477477        </para> 
    478                                <para> 
     478        <para> 
    479479          If everything went well, you should have a complete XML capabilities document. 
    480480          Search it for the word "WARNING"... MapServer inserts XML comments starting 
     
    484484          otherwise things are likely not going to work. 
    485485        </para> 
    486                        </sect3> 
    487                        <sect3 id="val_getmap"> 
    488                                <title>Test With a GetMap Request</title> 
    489                                <para> 
     486      </sect3> 
     487      <sect3 id="val_getmap"> 
     488        <title>Test With a GetMap Request</title> 
     489        <para> 
    490490          OK, now that we know that our server can produce a valid XML GetCapabilities 
    491491          response we should test the GetMap request.  
    492492        </para> 
    493                                <para> 
     493        <para> 
    494494          Simply adding <filename>"VERSION=1.1.0&amp;REQUEST=GetMap"</filename> to your server's URL should  
    495495          generate a map with the default map size and all the layers with STATUS ON or 
    496496          DEFAULT displayed, e.g. 
    497497        </para> 
    498                                <programlisting> 
     498        <programlisting> 
    499499   http://my.host.com/cgi-bin/mapserv?map=mywms.map&amp;VERSION=1.1.0&amp;REQUEST=GetMap 
    500500        </programlisting> 
    501                                <para> 
     501        <para> 
    502502          (Note that this works with MapServer's WMS interface even if it would be an 
    503503          incomplete GetMap request according to the WMS spec.  It lacks several  
     
    505505          it is good enough.) 
    506506        </para> 
    507                        </sect3> 
    508                        <sect3 id="val_client"> 
    509                                <title>Test with a Real Client</title> 
    510                                <para> 
     507      </sect3> 
     508      <sect3 id="val_client"> 
     509        <title>Test with a Real Client</title> 
     510        <para> 
    511511          If you have access to a WMS client then register your new server's online 
    512512          resource with it and you're running. 
    513513        </para> 
    514                                <para> 
     514        <para> 
    515515          If you don't have your own WMS client then CubeWerx's WMS interface (cubeview) 
    516516          can be useful to test a new server.  Access the following page: 
     
    521521          your server's layers. 
    522522        </para> 
    523                        </sect3> 
    524                </sect2> 
    525                <sect2 id="onlineresourceurl"> 
    526                        <title>More About the Online Resource URL</title> 
    527                        <para> 
     523      </sect3> 
     524    </sect2> 
     525    <sect2 id="onlineresourceurl"> 
     526      <title>More About the Online Resource URL</title> 
     527      <para> 
    528528        As mentioned in the section <link linkend="wms_onlineresource"> 
    529529        "Setup a Mapfile / wms_onlineresource metadata"</link> above, the following Online Resource URL is 
    530530          perfectly valid for a MapServer WMS according to section 6.2.1 or the WMS 1.1.0 specification: 
    531531      </para> 
    532                        <programlisting> 
     532      <programlisting> 
    533533   http://my.host.com/cgi-bin/mapserv?map=mywms.map&amp; 
    534534      </programlisting> 
    535                        <para> 
     535      <para> 
    536536        However, some people will argue that the above URL contains mandatory  
    537537        vendor-specific parameters and that this is illegal.  First we would like 
     
    542542        WMS 1.1.0 section 6.2.1</ulink>). 
    543543      </para> 
    544                        <para> 
     544      <para> 
    545545        But anyway, even if it's valid, the above URL is still ugly.  And you might  
    546546        want to use a nicer URL for your WMS Online Resource URL.  Here are some  
     
    548548        work for Windows/Apache users as well. 
    549549      </para> 
    550                        <orderedlist> 
    551                                <listitem> 
    552                                        <para> 
     550      <orderedlist> 
     551        <listitem> 
     552          <para> 
    553553            On Unix servers, you can setup a wrapper 
    554554            shell script that sets the MS_MAPFILE environment variable and then 
     
    556556            OnlineResource URL: 
    557557          </para> 
    558                                        <programlisting> 
     558          <programlisting> 
    559559   #! /bin/sh 
    560560   MS_MAPFILE=/path/to/demo.map 
     
    562562   /path/to/mapserv            
    563563          </programlisting>