RE [Polluriel potentiel] Re: [mapserver-users] Relative path's in mapfile
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Wed Jan 25 06:01:35 PST 2012
How do you manage the server/domain name in the mapfile for
wms_onlineressource when migrating from dev to prod environment.
Per example,
http://localhost:80/cgi-bin/mapserv.exe?map=MYMAP
Do we need to manually change localhost:80 before migrating to prod?
thanks
steve
Richard Greenwood <richard.greenwood at gmail.com>@lists.osgeo.org
Envoyé par : mapserver-users-bounces at lists.osgeo.org
2012-01-24 21:16
A
Juan Jesús Cremades Monserrat <relicary at gmail.com>
cc
mapserver-users at lists.osgeo.org
Objet
[Polluriel potentiel] Re: [mapserver-users] Relative path's in mapfile
2012/1/24 Juan Jesús Cremades Monserrat <relicary at gmail.com>:
> Hi!
>
> I'm creating a new mapfile and when I arrive to the WMS_ONLINERESOURCE
> tag the "map" paremeter at the URL I would like i'll be a relative
path,
> non an absolute.
>
> For example, now my mapfile is like this:
>
> "wms_onlineresource"
> "
http://localhost:80/cgi-bin/mapserv.exe?map=C%3A%5CFiles%5Capps%5Cdemo%5CdemoCV.map
"
>
> And the great solution could be:
>
> "wms_onlineresource"
> "http://localhost:80/cgi-bin/mapserv.exe?map=%5Capps%5Cdemo%5CdemoCV.map
"
>
> Is it possible? Thanks
I believe the map file path is relative to mapserv.exe. You can test
this yourself.
A more common and flexible approach is to set and environment variable
in your Apache httpd.conf file, for example
SetEnv MYMAP "C:/Files/apps/demo/demoCV.map"
Those are forward slashes not back slashes even though it's Windows.
And your URL is now
http://localhost:80/cgi-bin/mapserv.exe?map=MYMAP
This is considered to be more secure because you are not exposing your
file system path to the public.
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/20120125/5c09012b/attachment.htm>
More information about the MapServer-users
mailing list