FASTCGI
FastCGI is an extension to CGI, not dependent to the language
used, providing high performance for applications, by not using server
specific APIs. In FastCGI, you won't have a separate process for every
script request. The communication with the MyServer process happens trough
sockets.
You can use FastCGI in MyServer, simply by setting the MIME Type for your script
language to run as
FastCGI (set as RUNFASTCGI).
Read the PHP section
on how using PHP+FastCGI.
Like in CGI, you can place a cgi-bin
directory in the web directory in MyServer
as
seen below, and put all your applications on it:
The cgi-bin folder is directly
beneath the selected web folder.
However, CGI scripts can be placed anywhere as it is mapped to the web
server through its extension.
Remote FastCGI Servers
MyServer has the capability of using a remote FastCGI server.
The following MIME type uses a remote connection:
<MIMETYPE>
<EXT>php</EXT>
<MIME>text/html</MIME>
<CMD>RUNFASTCGI</CMD>
<MANAGER>@host:port</MANAGER>
</MIMETYPE>
The definition for a remote manager must begin with @.
If you are configuring the MIME types through the Control center
application, you can add a remote server by adding a line in the form
@HOST:PORT
in the FastCGI path field.
Please refer to the official FastCGI site for
more information about FastCGI.
Shortcuts
MyServer adopts a lazy-initialization politic for the FastCGI
processes, the FastCGI server is executed on the first request to
it. In this way the startup time of myserver is much faster but it
will use this time on the first request, if you don't like the default
behaviour you can configure a shortcut in the myserver.xml file.
Please refer to the "How to use shortcuts" tutorial in
the SCGI protocol documentation.
Be sure to specify the value FASTCGI in the domain descriptor for the
shortcut!
The DOMAIN descriptor has to look like this line:
<DOMAIN>FASTCGI<DOMAIN>