configuratioin fastcgi C/C++ program

JCR nginx-forum at nginx.us
Tue Jun 1 23:31:43 MSD 2010


hello

I have a fastcgi program like this
[code]
      1 #include "/usr/local/include/fcgi_stdio.h" 
      2 #include <stdlib.h>
      3 int count;
      4 void initialize(void)
      5 {
      6   count=0;
      7 } 
      8 int main(void)
      9 {
     10   initialize();
     11   
     12   while (FCGI_Accept() >= 0)
     13   {
     14     printf("Content-type: text/html\r\n"
     15            "\r\n"
     16            "<title>FastCGI Hello! (C, fcgi_stdio library)</title>"
     17            "<h1>FastCGI Hello! (C, fcgi_stdio library)</h1>"
     18            "Request number %d running on host <i>%s</i>\n",
     19            ++count, getenv("SERVER_HOSTNAME"));
     20   }        
     21   return 1;
     22 }
[/code]

which compiles fine but I am unable to configure nginx to execute it. 

I read http://wiki.nginx.org/NginxConfiguration but to no avail.

Also, once I will have figured this out, I will need that program to work with the nginx_http_push_module-0.692

Nginx is otherwise working fine on my Centos 5 machine.

Could anyone point me to an example for such a configuration.

Thank you

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




More information about the nginx mailing list