[mapserver-users] map file paths

Richard Greenwood richard.greenwood at gmail.com
Wed Nov 3 23:37:30 EDT 2010


John, Puneet,

Being able to leave the .exe extension off in Windows is new to me and
medium cool. Based on some rather foggy recollection, I think that it
is limited to Apache. I don't think it works under IIS. But it's handy
if you're developing on Windows and serving on *NIX.

I'm kind of with Puneet in that I don't think multiple copies of
binaries is generally good advise. However, under Windows (Apache or
IIS) there is far less flexibility in wrapper scripts[1] than under
*NIX, so I can see the appeal.

Regards,
Rich

[1] The most common wrapper under Windows in an ASP script, which not
only restricts you to IIS, but ASP has been superseded by ASPX, and I
haven't seen an ASPX wrapper yet. You can install Perl (I know Puneet
doesn't think a computer is worth booting if it doesn't have Perl) but
that's just one more dependency for most Windows users. And it seems
like there should be an option to wrap a CGI in PHP, but I have yet to
find it.




On Wed, Nov 3, 2010 at 7: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).  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
>
>



-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com


More information about the mapserver-users mailing list