Re: [mapserver-users] Copy mapserv.exe problem

2019-10-31 Thread Jeff McKenna

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  On Behalf Of 
StefanWebViewer
Sent: Thursday, 31 October 2019 4:01 a.m.
To: mapserver-users@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/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Copy mapserv.exe problem

2019-10-31 Thread WhereGroup
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  On Behalf Of 
> StefanWebViewer
> Sent: Thursday, 31 October 2019 4:01 a.m.
> To: mapserver-users@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!
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


Viele Grüße,
Jörg Thomsen

-- 

***
Where2B Konferenz 2019
12. Dezember 2019 in Bonn
where2b-conference.com
***

Jörg Thomsen
WhereGroup GmbH
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 5130 278 11

joerg.thom...@wheregroup.com
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885

---
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Copy mapserv.exe problem

2019-10-30 Thread 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

Regards
Robert

-Original Message-
From: mapserver-users  On Behalf Of 
StefanWebViewer
Sent: Thursday, 31 October 2019 4:01 a.m.
To: mapserver-users@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!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Copy mapserv.exe problem

2019-10-30 Thread Carlos Ruiz
Stefan,
If you have several URLs then you have to assign the map CGI variable based on 
the URL request, this is done in http.conf (Apache).

   On Wednesday, October 30, 2019, 9:01:24 AM CST, StefanWebViewer 
 wrote:  
 
 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!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Copy mapserv.exe problem

2019-10-30 Thread StefanWebViewer
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!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users