Go to file
Ana Guerrero 0e46b31932 Accepting request 1180339 from devel:libraries:c_c++
Forwarded request #1180337 from dimstar

- Rename perl-FastCGI subpackage to perl-FCGI: adjust the package
  name to the actual perl module name.

OBS-URL: https://build.opensuse.org/request/show/1180339
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/FastCGI?expand=0&rev=32
2024-06-14 16:57:13 +00:00
.gitattributes OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/FastCGI?expand=0&rev=1 2007-01-15 22:49:03 +00:00
.gitignore OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/FastCGI?expand=0&rev=1 2007-01-15 22:49:03 +00:00
2.4.0.tar.gz Accepting request 1086782 from home:fcrozat:branches:devel:libraries:c_c++ 2023-05-15 10:48:28 +00:00
fastcgi-2.4.0_missing_call_to_fclose.patch Accepting request 27556 from devel:libraries:c_c++ 2009-12-26 10:35:20 +00:00
FastCGI-clientdata_pointer.patch OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/FastCGI?expand=0&rev=1 2007-01-15 22:49:03 +00:00
FastCGI-fix_deprecated_api.patch Accepting request 97777 from home:darix:branches:OBS_Maintained:FastCGI 2011-12-21 16:26:41 +00:00
FastCGI-gcc44.patch OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/FastCGI?expand=0&rev=3 2009-03-02 00:32:55 +00:00
FastCGI-makefile.am_cppflags.patch OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/FastCGI?expand=0&rev=1 2007-01-15 22:49:03 +00:00
FastCGI-perl514.patch Accepting request 71556 from home:namtrac:branches:devel:libraries:c_c++ 2011-05-27 07:57:07 +00:00
FastCGI-perl526.patch Accepting request 1174150 from home:dimstar:Factory 2024-06-02 10:00:46 +00:00
FastCGI-supervise_cgi-fcgi.patch OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/FastCGI?expand=0&rev=1 2007-01-15 22:49:03 +00:00
FastCGI.changes Accepting request 1180337 from home:dimstar:Factory 2024-06-13 09:01:17 +00:00
FastCGI.spec Accepting request 1180337 from home:dimstar:Factory 2024-06-13 09:01:17 +00:00
README.supervise OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/FastCGI?expand=0&rev=1 2007-01-15 22:49:03 +00:00

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

taken from http://rubyists.com/articles/2005/05/03/spawn-fcgi-in-the-foreground:

spawn-fcgi in the foreground!
by Bougyman Tue, 03 May 2005 11:00:00 GMT

Been looking for a clean way to spawn fastcgi listeners in the foreground and I
believe Trey has figured it out. This patch should take care of it by keeping
spawn-fcgi from losing track of the copied listening processes and allow full
supervison. To use, call your cgi-fcgi -start -connect $host:$port script with
the -supervise option, like:

cgi-fcgi -start -supervise -connect 127.0.0.1:1791 /path/to/dispatch.fcgi

Full Supervise run script becomes

    #!/bin/sh
    RAIL_NUMBER=$(basename $PWD|awk -F'-' '{print $2}')
    RAILS_HOST=$(<env/RAILS_HOST)
    RAILS_ROOT=$(<env/RAILS_ROOT)
    RAILS_PORT=179$RAIL_NUMBER
    exec envdir ./env \
      cgi-fcgi -supervise -start -connect \
      $RAILS_HOST:$RAILS_PORT \
      $RAILS_ROOT/public/dispatch.fcgi

This would be in a script called run in your ~/service/someapp-$RAIL_NUMBER
directory, where $RAIL_NUMBER is 1-99. The references to ./env require a
directory named env to be set up in the same directory as the run script.
This should have at least 3 files in it:

RAILS_ROOT => contains one line that is the full path to your rails root directory.
RAILS_ENV => contains one word, either production or development
RAILS_HOST => contains one IP address or FQDN

You can set any other environment variables in this way by simply creating a
file with the variable name and its contents will become the value of that
environment variable. Because of the envdir ./env call before the cgi-fcgi
call, your rails application has access to any variables set in this way.