You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# to block MapServer from accesssing Mapfile by path uncomment below
198
+
# to block MapServer from accesssing mapfile by path uncomment below
199
199
# MS_MAP_NO_PATH TRUE
200
200
END
201
201
202
-
# allow Mapfiles to be accessed by key
202
+
# allow mapfiles to be accessed by key
203
203
MAPS
204
204
"test" "C:/MapServer/apps/tests/test.map"
205
205
END
@@ -225,7 +225,7 @@ Alternatively it can beset from the command line with the following command:
225
225
Setting up Applications
226
226
-----------------------
227
227
228
-
MapServer applications consist of a Mapfile, and additional optional files for data, symbols, logs, and images. The same instance of MapServer
228
+
MapServer applications consist of a mapfile, and additional optional files for data, symbols, logs, and images. The same instance of MapServer
229
229
can be used to serve many applications. In this example we will create a new ``test`` subfolder for a test application in a ``C:\MapServer\apps`` folder.
230
230
231
231
.. code-block:: bat
@@ -283,7 +283,7 @@ You can set-up MapServer logging by adding the following lines to your ``MAP`` b
283
283
DEBUG 5 # a value from 0 (OFF) to 5 (detailed)
284
284
CONFIG "MS_ERRORFILE" "logs\ms.log"
285
285
286
-
The path to the log file is relative to the Mapfile, so in this example you need to create a new ``C:\MapServer\apps\test\logs`` folder:
286
+
The path to the log file is relative to the mapfile, so in this example you need to create a new ``C:\MapServer\apps\test\logs`` folder:
287
287
288
288
.. code-block:: bat
289
289
@@ -339,7 +339,7 @@ The ``MS_MAPFILE`` environment variable can be set to a default map as follows:
339
339
You can make then make a request without the query string requiring ``map=C:/MapServer/apps/test/test.map``: http://localhost/mapserver/mapserv?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=country_bounds&STYLES=&CRS=EPSG:4326&BBOX=-180,-90,180,90&WIDTH=400&HEIGHT=300&FORMAT=image/png
340
340
341
341
In addition to this method the `URL Rewrite module <https://www.iis.net/downloads/microsoft/url-rewrite>`_
342
-
can be used to set different Mapfiles dependent on query string parameters or domain names.
342
+
can be used to set different mapfiles dependent on query string parameters or domain names.
343
343
344
344
Setting a Certificates File
345
345
+++++++++++++++++++++++++++
@@ -356,7 +356,7 @@ See :ref:`wxs_secure` for further details.
356
356
Securing MapServer in IIS
357
357
--------------------------
358
358
359
-
MapServer has two environment variables that can be used to restrict which Mapfiles can be accessed.
359
+
MapServer has two environment variables that can be used to restrict which mapfiles can be accessed.
360
360
361
361
.. note::
362
362
@@ -369,7 +369,7 @@ be set to any value ("True" in this example) so that only the ``MS_MAPFILE`` env
369
369
370
370
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='C:\Mapserver\bin\mapserv.exe'].environmentVariables.[name='MS_MAP_NO_PATH',value='True']" /commit:apphost
371
371
372
-
``MS_MAP_PATTERN`` can be set to limit the folders from which Mapfiles can be accessed using a regular expression. For example to limit
372
+
``MS_MAP_PATTERN`` can be set to limit the folders from which mapfiles can be accessed using a regular expression. For example to limit
373
373
to the ``C:\MapServer\apps`` (note this path is case-sensitive) folder use the following regular expression: ``"^(C:)?\/MapServer\/apps\/((?!\.{2})[_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.(map))$"``
374
374
375
375
.. code-block:: bat
@@ -378,7 +378,7 @@ to the ``C:\MapServer\apps`` (note this path is case-sensitive) folder use the f
378
378
379
379
In addition to these methods IIS itself can be used to block or filter query string parameters. The
+ If the ``CONFIG`` file security regular expressions used to limit access to Mapfiles do not match the supplied Mapfile you will receive the following:
433
+
+ If the ``CONFIG`` file security regular expressions used to limit access to mapfiles do not match the supplied mapfile you will receive the following:
0 commit comments