Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions en/mapfile/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ ENV
the Web server. MapServer will fall back to the environment variables
if they exist for any of the :ref:`MS* variables<environment_variables>`.

MapServer 8.8 introduces the :ref:`ms_onlineresource` setting, which allows the external root URL
to be defined in the CONFIG file and applied to all Mapfiles in a deployment.

.. index::
pair: CONFIG; MAPS
:name: mapfile-config-maps
Expand Down Expand Up @@ -151,6 +154,7 @@ A full sample config file is shown below:
# MS_MAPFILE_PATTERN "\.map$"
# MS_XMLMAPFILE_XSLT "/path/to/mapfile.xsl"
# MS_MODE "BROWSE" # default mode for CGI calls
# MS_ONLINERESOURCE "https://maps.example.com/" # used as a base URL for building OWS URLs when not specified in the Mapfile
# MS_OPENLAYERS_CSS_URL "//mapserver.org/lib/10.4.0/ol-mapserver.css" # default value
# MS_OPENLAYERS_JS_URL "//mapserver.org/lib/10.4.0/ol-mapserver.js" # default value
# MS_TEMPPATH "/tmp"
Expand Down
6 changes: 6 additions & 0 deletions en/ogc/wfs_server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ layers that meet the following conditions:
shouldn't count on that too much. It is strongly recommended that
you provide the wfs_onlineresource metadata.

As of MapServer 8.8, the new :ref:`ms_onlineresource` environment variable can be defined in the CONFIG file
to provide a global fallback online resource URL for all services, including WFS.
This is useful when multiple Mapfiles are deployed and you want to avoid setting the URL in each one.
Service-specific metadata (for example, ``wfs_onlineresource``) takes precedence if both are defined.


See section 12.3.3 of the `WFS 1.0.0 specification`_ for the whole
story about the online resource URL. Basically, what you need is a
complete HTTP URL including the http:// prefix, hostname, script
Expand Down
7 changes: 7 additions & 0 deletions en/ogc/wms_server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ Example 2. On Windows:
.. index::
pair: WMS Server; Mapfile

.. _wms_mapfile_setup:

Setup a Mapfile For Your WMS
----------------------------

Expand Down Expand Up @@ -306,6 +308,11 @@ Let's go through each of these parameters in more detail:
shouldn't count on that too much. It is strongly recommended that
you provide the wms_onlineresource metadata.

As of MapServer 8.8, the new :ref:`ms_onlineresource` environment variable can be defined in the CONFIG file
to provide a global fallback online resource URL for all services, including WMS.
This is useful when multiple Mapfiles are deployed and you want to avoid setting the URL in each one.
Service-specific metadata (for example, ``wms_onlineresource``) takes precedence if both are defined.

See section 6.2.2 of the `WMS 1.1.1 specification`_ for the whole
story about the online resource URL. Basically, what you need is a
complete HTTP URL including the http:// prefix, hostname, script
Expand Down
23 changes: 23 additions & 0 deletions en/optimization/environment_variables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,29 @@ MS_MODE
.. index::
pair: Environment variables; MS_OPENLAYERS_JS_URL

.. _ms_onlineresource:

MS_ONLINERESOURCE
.. versionadded:: 8.8

Defines the root URL used by MapServer to construct all external service URLs.
This can only be set in the MapServer :ref:`config` file and cannot
be used inside individual Mapfiles.

``MS_ONLINERESOURCE`` can replace the need to set the
``ows_onlineresource`` metadata in each Mapfile, providing a single
location to manage the base URL for all services in a deployment.

This is especially useful when working with many Mapfiles, or when
the base URL differs between environments (for example, development
and production).

For additional details, see :ref:`rfc141` and the
section on ``wms_onlineresource`` metadata in :ref:`wms_mapfile_setup`.

.. index::
pair: Environment variables; MS_ONLINERESOURCE

MS_OPENLAYERS_CSS_URL
The URL to the OpenLayers CSS file used for styling the :ref:`openlayers`.
for instance::
Expand Down