[FASTCGI] config variables

Rob rclemley at booksys.com
Wed Jul 21 13:44:23 EDT 2010


  On 07/20/2010 01:52 PM, Wes Widner wrote:
> Where is the best place to set config variables to be passed to a 
> fastcgi application? With regular cgi I used a .htaccess file with 
> SetEnv in the cgi-bin directory to set variables I could then retrieve 
> via getenv, but that doesn't seem to work the same with a fastcgi 
> application. Is there another way to pass variables that don't need to 
> change or be passed along with each request?

FastCGI works in many contexts.  It would help if you briefly describe 
your software and how it's configured.

Since you mention .htaccess, I  assume you're using Apache.

If you configure Apache for your app with the FastCgiServer directive, 
then see the -initial-env option to that directive.

If you configure Apache for your app with the FastCgiExternalServer 
directive, then you must arrange to set the variables with whatever 
method you use to start your app.  The simplest would be a shell script 
which sets the variables and then execs your app.



More information about the FastCGI-developers mailing list