[mapserver-users] Copy mapserv.exe problem

Jeff McKenna jmckenna at gatewaygeomatics.com
Thu Oct 31 07:36:49 PDT 2019


Hi Robert,

If you are using MS4W, you likely already followed the steps at 
https://mapserver.org/ogc/wms_server.html#apache-setenvif and added the 
SetEnvIf to the bottom of your local file /ms4w/Apache/conf/httpd.conf

Don't forget to also restart Apache after this change, as Administrator 
(executing /ms4w/apache-restart.bat )

Another hint that I follow always on Windows is to make sure that your 
path to your mapfile contains no spaces (otherwise you will have grief 
sometimes, and turn your hair grey).

Hope those hints help.

-jeff


--

Thank you for using MS4W.
"MS4W: open doors as well as windows"




On 2019-10-31 5:39 AM, Jörg Thomsen (WhereGroup) wrote:
> hi,
> 
> Am 30.10.19 um 20:52 schrieb Robert Sanson:
>> Hi Stefan
>>
>> Is your mapserver on Windows? Once you copy mapserv.exe change its name to the name of your mapfile and then edit httpd.conf and set up Apache redirects for each one
>>
>> Eg. Suppose you had a mapfile map1.map and you copied mapserv.exe to map1.exe, then you could put the following line into httpd.conf:
>>
>> SetEnvIf Request_URI "/cgi-bin/map1?" MS_MAPFILE=/path_to/map1.map
> 
> you don't need copies of the binary, just create apache rewrite rules like
> RewriteRule ^/wms1?$ /cgi-bin/mapserv?map=/path_to/map1.map
> RewriteRule ^/wms2?$ /cgi-bin/mapserv?map=/path_to/map2.map
> RewriteRule ^/wms3?$ /cgi-bin/mapserv?map=/path_to/map3.map
> 
> now you can request your wms with
> 
> http://../cgi-bin/wms1?SERVICE=WMS&...
> 
> see
> https://mapserver.org/ogc/wms_server.html#apache-rewrite-rules-using-apache-mod-rewrite
> 
> Jörg
> 
>>
>> Regards
>> Robert
>>
>> -----Original Message-----
>> From: mapserver-users <mapserver-users-bounces at lists.osgeo.org> On Behalf Of StefanWebViewer
>> Sent: Thursday, 31 October 2019 4:01 a.m.
>> To: mapserver-users at lists.osgeo.org
>> Subject: [mapserver-users] Copy mapserv.exe problem
>>
>> Hey!
>> I had already formulated an entry recently in which I asked for the error
>> message "msCGILoadMap (): Web application error. CGI variable" map "is not
>> set." asked.
>> Now I think I have found a more accurate diagnosis. For our project we need
>> several mapserv.exe, because we present different maps (Mapfiles) to
>> different users. Every time I come up with a new copy of the mapserv.exe
>> this error message follows. Does anyone know this problem? Does something
>> have to be considered when copying this file? Thank you very much!
>>
>>
>>
>> --

-- 
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/


More information about the mapserver-users mailing list