[mapserver-users] map file paths
John Callahan
john.callahan at udel.edu
Wed Nov 3 18:20:54 PDT 2010
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101103/0a682093/attachment.htm>
More information about the MapServer-users
mailing list