nginx and FastCGI C/C++

kleinchris nginx-forum at nginx.us
Sat Jun 5 17:30:25 MSD 2010


Hello is it possible, that nginx can open FastCGI Application's like the Apache2 mod_fastcgi and open applications like:
[code]
#include <fcgi_stdio.h>

int main(void)
{
   unsigned int counter = 1;
   while(FCGI_Accept() >= 0)
   {
      printf("Content-type: text/html\r\n\r\n");
      printf("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n");
      printf("   \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\r\n");
      printf("<html>\r\n");
      printf("   <head>\r\n");
      printf("      <title>FastCGI ist schnell!</title\r\n");
      printf("   </head>\r\n");
      printf("   <body>\r\n");
      printf("      <h1>Das erste FastCGI</h1>\n\r");
      printf("      <p>Das FastCGI wurde bisher %d mal aufgerufen</p>\r\n",
            counter++);
      printf("   </body>\r\n");
      printf("</html>\r\n");
   }
   return 0;
}
[/code]
The file ending should be index.fcgi, and i don't want a fastcgi_pass directive.. Is this possible?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,94807,94807#msg-94807




More information about the nginx mailing list