4

We need to get an internal instance of MapServer up and running. We want to use Apache and not IIS because we already have an Apache 2.4 instance up and running on our office intranet.

The Windows builds are available from a number of websites on this page: http://mapserver.org/download.html#windows

I chose the Gisinternals build because it has daily builds, and the packages are available as Zip distributions.

I need to run MapServer as a CGI from Apache.

There is a lack of accurate information on the internet about how to get this installed, configured and running correctly with Apache on Windows and I have been struggling for the last 2 days without success. Searched for over 6 hours today, trying various configurations and still got nowhere. I'm very exhausted frustrated.

If you have managed to get MapServer up and running with Apache on Windows, please tell me how you did it, which build you used and step by step configuration details. I also want to use it with mod-fastcgid.

This could become a great community post that would help others in the same situation.

UPDATE: I got it up and running by copying the DLL files to the same CGI-Bin directory where the mapserver executable resides. However now I get the error:

mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided.

The url I browsed to looks like this: http://localhost/cgi-bin/mapserv.fcgi?map=c:\mapservproj\proj1.map

Still looking for a good step-by-step guide to setting this up though..

  • Did you check out the OneGeology WMS cookbook, it has a section on installing MapServer from gisinternals: onegeology.org/wmsCookbook/4_4_3.html – nmtoken Jun 9 '15 at 11:21
  • @nmtoken Yes. I have been been trying the instructions there to no avail. After setting up FastCGI, I'm getting the error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. In the Apache error log file: [fcgid:warn] [pid 5024:tid 772] (OS 109)The pipe has been ended. : [client ::1:50865] mod_fcgid: get overlap result error [core:error] [pid 5024:tid 772] [client ::1:50865] End of script output before headers: mapserv.fcgi – Steve F Jun 9 '15 at 11:27
  • The thread is old, but I found myself in the same troubles and solved by copying the DLLs in the cgi-bin folder. However, the GISinternals docs reads reads that "In order to run the utility programs the compiled dll-s should be available to load during the execution. Therefore the PATH environment parameter should contain the full path to /bin directory of the package or the dlls in this directory should be copied into the directory from which the application (executable) is running". So another option should be the former, but I cannot set the PATH var properly. Any suggestion? – umbe1987 Jun 9 '17 at 9:45
2

I'm using a ms4w build http://www.maptools.org/ms4w/. It's quite enough for me, but it seems to be frozen. Also you can use OSGeo4w package http://trac.osgeo.org/osgeo4w/.

  • MS4W is currently stuck on 32-bit Apache 2.2 with MapServer 6.0.3, which is quite limiting I think. We used to use this for our Windows/Mapserver services but have now switched to using 64-bit Apache from Apache Lounge and Mapserver from GISinternals. – nmtoken Jul 16 '15 at 12:59
1

You have done right way because you got this message.

mapserv(): Web application error. Traditional BROWSE mode requires a TEMPLATE in the WEB section, but none was provided.

You just need to add some GET parameter in url... like this (depend on your mapfile content):

http://localhost/cgi-bin/mapserv.fcgi?map=c:\mapservproj\proj1.map&layer=layer&mode=map

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.