[mapserver-users] Hide MAP Key file directory path
Brent Fraser
bfraser at geoanalytic.com
Mon Apr 12 08:56:31 PDT 2021
It looks like you are using QGIS Server (I think it used to be called mapserver), not this MapServer.
Try https://documentation.qgis.org/3.16/en/docs/server_manual/introduction.html
----------------------------------------
From: 1520 gis <juliermeopensourcedeveloper at gmail.com>
Sent: 4/12/21 9:28 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Hide MAP Key file directory path
Hi developers,
I have hit my head on a wall, trying to hide the path of the file .qgs available in MAP Key.
My first attempt was to redirect the URL (QUERY_STRING) according to the link :
RewriteEngine on
RewriteRule wmsmap?(.*) /cgi-bin/mapserv?map=/home/www/mapserverstuff/mymapfile.map&$1
Everything works fine if the whole URL is written in Substitution part
RewriteEngine on
RewriteRule qgis-server?(.*) /cgi-bin/qgis_mapserv.fcgi?map=/home/qgis/project/map.qgs&version=1.3.0&service=WMS&request=GetCapabilities&$1
However, if I just add the MAP Key value in the query, I got the error [1] bellow, even setting the insensitive flag [NC]:
RewriteEngine on
RewriteRule qgis-server?(.*) /cgi-bin/qgis_mapserv.fcgi?map=/home/qgis/project/map.qgs.map&$1
[1]
localhost/qgis-server?
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0">
<ServiceException code="Service configuration error">Service unknown or unsupported. Current supported services (case-sensitive): WMS WFS WCS WMTS SampleService, or use a WFS3 (OGC API Features) endpoint</ServiceException>
</ServiceExceptionReport>
In order to start using the RewriteCond %{QUERY_STRING} MAP=/home/qgis/project/map.qgs, I need to get this (case-sensitive) first. Refer to [1].
Any help in this matter will be very appreciated.
Kind regards
Julierme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210412/a264b67d/attachment.htm>
More information about the MapServer-users
mailing list