fastcgi & mapserver

Tim Bowden tim.bowden at WESTNET.COM.AU
Wed Mar 8 22:04:19 PST 2006


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