FastCGI on lighttpd no data received
Posted
by
Michael Sh
on Server Fault
See other posts from Server Fault
or by Michael Sh
Published on 2012-11-24T04:10:26Z
Indexed on
2012/11/24
5:07 UTC
Read the original article
Hit count: 295
I have a simple FastCGI script:
public static void main (String args[]) {
int count = 0;
while(new FCGIInterface().FCGIaccept()>= 0) {
count ++;
System.out.println("Content-type: text/html\n\n");
System.out.println("<html>");
System.out.println(
"<head><TITLE>FastCGI-Hello Java stdio</TITLE></head>");
System.out.println("<body>");
System.out.println("<H3>FastCGI Hello Java stdio</H3>");
System.out.println("request number " + count +
" running on host "
+ System.getProperty("SERVER_NAME"));
System.out.println("</body>");
System.out.println("</html>");
}
}
Set up with lighttpd as:
server.modules += ( "mod_fastcgi" )
fastcgi.debug = 1
fastcgi.server = ( "/cgi" =>
( "fastcgi" =>
("port" => 8888,
"host" => "127.0.0.1",
"bin-path" => "/var/www/tiny.fcgi",
"min-procs" => 1,
"max-procs" => 1,
"check-local" => "disable"
))
)
In the log:
2012-11-24 04:35:04: (mod_fastcgi.c.1367) --- fastcgi spawning local
proc: /var/www/tiny.fcgi
port: 54321
socket
max-procs: 1
2012-11-24 04:35:04: (mod_fastcgi.c.1391) --- fastcgi spawning
port: 54321
socket
current: 0 / 1
2012-11-24 04:35:39: (mod_fastcgi.c.3061) got proc: pid: 0 socket: tcp:127.0.0.1:54321 load: 1
The problem is that there is no data being sent from the server to browser. Am I missing something here?
© Server Fault or respective owner