4.3 Configuring your MapServer WMS
The following section takes you through the exemplar service installed as part of the full download i.e. with Apache and MapServer (as part of MS4W) included. We are assuming that you will install into the root directory of a drive as required of this installation; typically this will be c:\, with all the content created within a folder called 'ms4w' (e.g. c:\ms4w). You do not need to create a folder called 'ms4w' as it is already part of the exemplar zip. To configure your own service using this structure you will need to make changes in the following folders:
C:\ms4w\apache\cgi-bin\ ~ you need to make a copy of the MapServer binaries and put them in a sub-folder with an alias name that conforms to the OneGeology WMS profile. This will be your service URL.
C:\ms4w\apps\ ~ you need to create a sub-folder and add your data, service templates, and map file.
C:\ms4w\httpd.d\ ~ you need to create an Apache .conf configuration file for your service, that follows the same naming convention as your service URL, and which maps together your app data and cgi service information.
You will also probably want to make changes in the following folder:
C:\ms4w\apache\htdocs\ ~ html documents linking to your service
It is recommended you copy the exemplar data rather than modify it to ensure you always have a reference copy you can refer to and preview.
The first query a WMS client will send to a server is a GetCapabilities request. In the response the server will supply information necessary for the client to know how many layers it is serving and how to retrieve them. It will also supply human readable information that could be useful for humans to understand what data is being served, what limitations it has, what restrictions on use etc. The way this information is viewable is dependent on the client, here we will just describe how you can make sure that it is included in the server response. MapServer will generate much of this information automatically for you from the configuration of data layers you include but there are some extra WMS specific parameters to include filling in all the fields of a GetCapabilities response. MapServer uses text configuration files called "mapfiles" with a MapServer specific syntax to configure its web services. The first main section is inside the <Service> element which can contain a variety of metadata, such as keywords and contact information about your WMS. These are essentially all defined by corresponding fields in the MapServer mapfile. The next <Capability> section contains some essentially automatically generated <Request> specifications detailing what URLs to use for requesting maps, feature information etc., and a series of <Layer> elements inside one parent <Layer> which give some automatically generated and some WMS specifically configured data on each of your layers. The example layers show exactly what parameters should be supplied for each layer; whilst appendix G (WMS version 1.1.1) and appendix F (WMS version 1.3.0) show how these relate to the appropriate GetCapabilities response.
Section last modified : 19 June 2011.