[REBOL] Re: About FastCGI
From: sqlab:gmx at: 3-Jul-2001 9:02
Hi,
> thanks for the answer. After playing with FastCGI concept thru the weekend
> and
> nearly going mad I finally have something working, but Windoze and Linux
> behave differently, although I use the same directives ...
>
Mine behave the same way with the same directives.)
> [sqlab--gmx--net] wrote:
>
> >
> > Windows:
> > FastCgiExternalServer "D:/Apache/mydocs/fastcgi-bin" -host
> localhost:15001
>
> So, I haven't tried this mode yet. FastCGI works in three modes - static
> (only
> when FastCGIServer directive is used), dynamic (default) and external.
> In default (dynamic) mode, your webserver starts/kills your apps itself.
> It
> seems to me, that for each url (script), it starts one instance of
> rebolcmd
> and at least one instance is running in the background.
>
> I am curious how does it communicate, if no host is specified. It has to
> use
> unix sockets or something like that, because I am not listening on any
> port,
> or am I?
>
If I understand the documentation, it depends of your configuration if you
use TCP ports or
Unix sockets / Windows pipes
> One question for you, as you seem to succesfully use External mode - do
> you
> run listening loop as described in fastcgi command docs in the beginning
> of
> each your script. Or you just start your server with such script?
>
My script loops
> One thing I am not able to resolve is - where to put license.key file?
> Rebol
> seems to look for license.key file in the launch dir = dir of your script
> ...
> How do I solve this one? :-)
>
Apache/Fastcgi expects the external application already running.
So you have to start it in before and are free to choose whatever directory
or options you like,
One more;
I thought the new applications inherit their environment from Apache, so you
should be able to set your REBOL_HOME either at startup of Apache or in the
configuration.
> >
> > <Location /fastcgi-bin>
> > SetHandler fastcgi-script
> > </Location>
> > ExternalAppClass /fastcgi-bin -host localhost:15001
> >
>
> Uhmm, never seen this one :-) Is it really required?
>
Without I get always Internal error, server misconfiguration
> Thanks,
> -pekr-
You are welcome
> Unix:
> > Just replace the path after FastCgiExternalServer with your complete
> path
> > without hyphens to the non-existing location.
> >
> > And don't forget to use getmodes this way;
> > cgi-data: get-modes fastcgi-conn 'cgi ; in your Rebol script.
> >
AR