[mapserver-users] How to deal with (visible) CONNECTION information in .MAP file for WMS purposes

Daniel Morissette dmorissette at mapgears.com
Tue Jan 7 05:22:00 PST 2014


On 14-01-07 5:47 AM, Stefan Schwarzer wrote:
> Thanks for all the valuable help!
>
> If I place the .MAP file somewhere where only the system can read it,
> the request looks a bit awkward: ….map=/home/include/mapfiles/my_map.map&….
>
> Would there a possibility to juste use …map=my_map&… and have the path
> then get added/understood by some internal configuration (mod_rewrite
> perhaps?)?
>

Hi Stefan,

Yes, this is also an option. You can use environment variables for your 
mapfile path and refer to the environment variable in the "map=..." 
parameter

e.g.

in Apache's httpd.conf:

   SetEnv MYMAP1=/home/include/mapfiles/my_map1.map
   SetEnv MYMAP2=/home/include/mapfiles/my_map2.map
   ...

and then in your mapserv URL use:

   /cgi-bin/mapserv?map=MYMAP1&...


-- 
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000




More information about the MapServer-users mailing list