[mapserver-users] map file paths

P Kishor punk.kish at gmail.com
Wed Nov 3 21:26:23 EDT 2010


On Wed, Nov 3, 2010 at 8:20 PM, John Callahan <john.callahan at udel.edu> wrote:
> Basically what I do is copy and rename mapserv.exe to some name I want in
> the URL.  Then, if a request goes to that file, set the MS_MAPFILE variable
> to the relevant map file.  This has worked well for me so far.
>
> For example, my organization recently published our 15th geologic map of out
> state.  I want people to refer to it as geomap15.  Therefore, I copied and
> renamed mapserv.exe to geomap15 (no exe extension, file still in cgi-bin
> directory).

So you have 15 copies of the binary floating around on your computer.
What a nightmare. If you upgrade, you have to make 15 copies of the
new version and replace the old version.

What would happen when you publish the 150th geologic map?

Use a single binary, and use a wrapper (or the env variable) to get
the right query.



> Then, I have the following in my httpd.conf file:
>
> SetEnvIf Request_URI "/cgi-bin/geomap15"
> MS_MAPFILE=C:/pathtomapfile/geomap15.map
>
> My URLs then look something like: http://maps.dgs.udel.edu/cgi-bin/geomap15?
>
> (This map file in action here:
> http://www.dgs.udel.edu/datasets/dgs-geologic-map-no-15-georgetown-quadrangle-dataset)
>
> - John
>
> **************************************************
> John Callahan, Research Scientist
> Delaware Geological Survey, University of Delaware
> URL: http://www.dgs.udel.edu
> **************************************************
>
>
> On Wed, Nov 3, 2010 at 8:41 PM, Richard Greenwood
> <richard.greenwood at gmail.com> wrote:
>>
>> On Wed, Nov 3, 2010 at 2:42 PM, David Hildebrand
>> <David.Hildebrand at afsc.ca> wrote:
>> > Is there a way of abbreviating pathnames to the map file?  For instance,
>> > my
>> > URL to produce a map is
>> >
>> >
>> >
>> >
>> > http://localhost/cgi-bin/mapserv.exe?map=//fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/MapServer/sample.map&mode=map
>> >
>> >
>> >
>> > In my apache configuration file I have
>> > //fileserver/PDP/Program_Dev/DHildebrand/geoprocessing_server/ aliased
>> > to
>> > /test/ but the alias does not seem to work with CGI.  I’m just wondering
>> > if
>> > there is a workaround so that I don’t need to specify the whole file
>> > path in
>> > my URL.
>> >
>> >
>> >
>> > Thanks.
>> >
>> > ===========================
>> > David V. Hildebrand
>> > Agriculture Financial Services Corporation
>> > (403) 782-8239
>>
>> In your Apache httpd.conf add:
>>   SetEnv MY_MAP  "C:/path/to/my/mapfile.map"
>>
>> and then your URL can be:
>>   http://localhost/cgi-bin/mapserv.exe?map=MYMAP&mode=map
>>
>> Shorter URL, better security.
>>
>> Rich
>>
>> --
>> Richard Greenwood
>> richard.greenwood at gmail.com
>> www.greenwoodmap.com
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================


More information about the mapserver-users mailing list