fastcgi & mapserver

Chris Tweedie chris at NARX.NET
Thu Mar 9 01:40:23 EST 2006


Tim, try using something like

SetEnvIf Request_URI "/mapserv.fcgi" MS_MAPFILE=/hello/mr/mapfile.map

in your apache http conf. It works for me at home anyway (in the sense 
that it is still invoked as fastcgi)

Chris

Quoting Tim Bowden <tim.bowden at WESTNET.COM.AU>:

> On Tue, 2006-03-07 at 15:43 -0500, Frank Warmerdam wrote:
>> Tim Bowden wrote:
>> > Hi,
>> >
>> > We have been testing mapserver with fastcgi and it is much faster
>> > getting data from sde sources than as a plain old cgi app.  Our problem
>> > with it is using a wrapper script- The wrapper script is not a fastcgi
>> > application and when we call mapserv from within the wrapper script it
>> > doesn't get treated as a fastcgi application.  Does anyone have any
>> > pointers as to how we can mix the two?
>>
>> Tim,
>>
>> Interesting point.  Is the wrapper script just a shell script setting
>> some environment variables?  While I generally like this approach, for
>> fastcgi you may be better off setting the environment variables in
>> the apache conf.
>>
>> My fastcgi apache conf on linux looks like:
>>
>> LoadModule fastcgi_module modules/mod_fastcgi.so
>> AddHandler fastcgi-script fcgi
>> FastCgiConfig -initial-env
>> LD_LIBRARY_PATH=/home/warmerda/gdal:/usr/local/pgsql/lib:/usr/local/lib:/usr/local/grass-6.0.0/lib:/usr/local/lib/mysql
>>
>> I assume you can use the -initial-env switch to set more variables if
>> needed.   Of course, if you want to have different settings for different
>> services this approach may not work easily.
>>
>> Fastcgi can be quirky for stuff like this!
>>
>> Best regards,
>
> We were using a simple bash script as the wrapper to set lib paths and
> map file locations.  One of our main aims was to remove the map= part of
> the url.  I know it's supposed to be legal in the ogc specs but we have
> had users reporting problems with certain apps (not sure which ones).
> The easiest way for us to solve the problem looks like url re-writing
> done by an apache reverse proxy we have sitting in front of the whole
> shebang.
>
> It would be nice though if fastcgi was easier to use.  <shrug> Oh, well.
>
> Thanks,
> Tim Bowden
> --
> Mapforge Geospatial
> Level 3/ 267 St Georges Tce
> Perth 6000
> Western Australia
>



More information about the mapserver-users mailing list