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 <[email protected]>@lists.osgeo.org Envoyé par : [email protected] 2012-01-24 21:16 A Juan Jesús Cremades Monserrat <[email protected]> cc [email protected] Objet [Polluriel potentiel] Re: [mapserver-users] Relative path's in mapfile 2012/1/24 Juan Jesús Cremades Monserrat <[email protected]>: > 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 [email protected] www.greenwoodmap.com _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
