SCGI
Simple Common Gateway Interface (SCGI) protocol is a replacement for
the CGI protocol. It is a standard for applications to interface with
HTTP servers. It is similar to FastCGI but is designed to be easier to
implement.
You can use SCGI in MyServer, simply by setting
the MIME Type
to RUNSCGI.
Remote SCGI Servers
The SCGI server has to be specified in
the MANAGER part of the MIME type in the
following way:
<MIMETYPE>
<EXT>scgi</EXT>
<MIME>text/html</MIME>
<CMD>RUNSCGI</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 SCGI path field.
How to use shortcuts
If the same server is used by different MIME types it is good idea to
put a shortcut to it. The following code must be placed in the
myserver.xml configuration file:
<PROCESS_SERVER>
<NAME>MY_SHORTCUT</NAME>
<DOMAIN>SCGI</DOMAIN>
<HOST>localhost</HOST>
<PORT>3333</PORT>
<LOCAL>NO</LOCAL>
</PROCESS_SERVER>
If LOCAL is equal to "YES" then the new
process will be created by myserver,
the NAME will be used as the path to the
process to execute. If the server is not local then
the NAME descriptor can have any value.
DOMAIN specifies the server domain and in
this case it has to have the value SCGI.
HOST and PORT
specify where the server is located and the listening TCP port.
NAME is the shortcut's name that will be
specified later for the MIME type.
After the shortcut is created it needs to be called by the MIME type,
the MANAGER descriptor in the MIME type has to
have the shortcut's name:
<MANAGER>MY_SHORTCUT</MANAGER>
If the manager is not a valid shortcut then the server will treat
the manager descriptor as described in the previous section.