About Backend FastCGI Server
Andrew Oberemchuk <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Organization | Dark Joker Multimedia |
| Message-ID | <1153404510.16103.17.camel@nx5000> |
Hello!
I read Your documentation, but can't find answer to my question:
how can i invoke my simple application as standalone FastCGI server
(like php-fcgi process) for processing requests from frontend
Web-server (using FastCGI Protocol)?
My simple application:
======================= 8< ============================
#include "fcgi_stdio.h" /* fcgi library; put it first*/
#include <stdlib.h>
int count;
void initialize(void)
{
count=0;
}
void main(void)
{
/* Initialization. */
initialize();
/* Response loop. */
while (FCGI_Accept() >= 0) {
printf("Content-type: text/html\r\n"
"\r\n"
"<title>FastCGI Hello! (C, fcgi_stdio library)</title>"
"<h1>FastCGI Hello! (C, fcgi_stdio library)</h1>"
"Request number %d running on host <i>%s</i>\n",
++count, getenv("SERVER_HOSTNAME"));
}
}
======================= 8< ============================
With best regards,
Andrew Oberemchuk
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/