locked
Configuring FastCGI on IIS 6.0 RRS feed

  • Question

  • User-1910087654 posted

     First, Thank you for creating this very cool CGI capability. I have been reading all day on this subject in my attempt to convert my CGI.exe written in Basic

     So I began by using the translated headers and compiling a simple example that just echo's anything sent using POST. The compiled app is called "echo.exe"

    I send it over to my server running windows server 2003 SP2 and drop it in the cgi-bin folder of my website.

    I have created the website under the "Web Sites" node of IIS

    and I have installed and  "Allowed" the "FastCGI Handler" under the "Web Service Extensions" node.

    Now the tricky part...  configuring fcgiext.ini

    In reading here:

    http://blogs.msdn.com/vijaysk/archive/2007/11/16/iis-6-0-fastcgi.aspx

    http://learn.iis.net/page.aspx/248/configuring-fastcgi-extension-for-iis60/

    I am not sure if I must create an entry for EACH of my cgi.exe executables.

    Since PHP has a single executable that handles the running of ALL php scripts i suspect these settings do not apply to my situation.

    Then there is the file "fcgiconfig.js"

    a helper application written in JavaScript with no help for using it to configure the  fcgiext.ini file?

    I assume the entire file preceeded with them so that the lines show up as comments in a code editor and are ignored, but this is not explicitly stated anywhere.

    My goal is to route control based on the calling query ie

    http://www.mysite.com/cgi-bin/echo.exe?txt=thisisatest

    gets routed to echo.exe

    http://www.mysite.com/cgi-bin/myserver.exe

    gets routed to myserver.exe

    How do I accomplish this?

     

    Added:

    The downloads section of fastcgi.com has:

     mod_fastcgi-2.4.6-AP22.dll

    Which has dependant Dll's

    libhttpd.dll

    libapr.dll

    etc

    This is for Apache on windows Server?


     

    Tuesday, November 11, 2008 6:20 AM

All replies

  • User-1910087654 posted

    Wade, I read your Blog

    http://forums.iis.net/t/1127831.aspx

    and

    http://blogs.iis.net/wadeh/archive/2007/03/02/first-post-fastcgi-settings-for-iis-5-1-6.aspx

    I too would like to create multiple FastCGI.exe that are called by name from the URL.

    This does not seem to be too wild a request and I am surprised this functionality was not included in the design.

    >If maintaining the external URL is important, you could write and ISAPI filter to rewrite the URLs to map nice looking external ones to the workaround above.

    Could you provide a simple code example of how to do this.

     

     

    Tuesday, November 11, 2008 5:05 PM
  • User-1910087654 posted

    How do I configure IIS 6.0  to route FastCGI requests (GET, POST on port 80) to an ip address and port that my app(running as a windows NT service) is monitoring?

    e.g. localhost

    "127.0.0.1" and 1027  ?

    Monday, November 17, 2008 7:37 AM
  • User511787461 posted

    IIS fastcgi implementation only supports communication over named pipes and can only work with fastcgi processes that it launches.

    Correction, tcp/ip is supported, but you cannote specify ip-address and port and IIS has to control launching of the fastcgi process.

    Tuesday, November 18, 2008 6:36 PM
  • User-1910087654 posted

     Anil,

    Thank you for your reply.

    I am confused about the purpose of the FastCGI function call:

    FCGX_OpenSocket()

    defined as

    DLLAPI int FCGX_OpenSocket(const char *path, int backlog)

     ' * Create a FastCGI listen socket.

    ' * path is the Unix domain socket (named pipe for WinNT), or a colon
    ' * followed by a port number. e.g. "/tmp/fastcgi/mysocket", ":5000"

    Can I route the incoming request to a named Pipe and specify that with this call?

     

     If Tcp/ip is supported, first, in the general case *HOW* do I configure IIS to route requests?

    Perhaps I could write a FastCGI application that routes to a second application in some clever way or maybe I needto write an ISAPI filter of some kind?

    Wednesday, November 19, 2008 5:35 PM
  • User511787461 posted

    No idea - this is not something that is part of IIS or the fastcgi protocol, this is a 3rd party API for writing fastcgi clients.

    Tuesday, November 25, 2008 8:49 PM