Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 582101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:39:04+00:00 2026-05-13T14:39:04+00:00

I am attempting to run a fastcgi app written in C language behind the

  • 0

I am attempting to run a fastcgi app written in C language behind the Nginx web server. The web browser never finishes loading and the response never completes. I am not sure how to approach it and debug. Any insight would be appreciated.

The hello world application was taken from fastcgi.com and simplified to look like this:

#include "fcgi_stdio.h"
#include <stdlib.h>

int main(void)
{

 while(FCGI_Accept >= 0)
 {
  printf("Content-type: text/html\r\nStatus: 200 OK\r\n\r\n");

 }

  return 0;
}

Output executable is executed with either one of:

cgi-fcgi -connect 127.0.0.1:9000 a.out

or

spawn-fcgi -a120.0.0.1 -p9000 -n ./a.out

Nginx configuration is:

server {
        listen   80;
        server_name _;

 location / {
                        # host and port to fastcgi server
                        root   /home/user/www;
                        index  index.html;

                        fastcgi_pass 127.0.0.1:9000;
 }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:39:04+00:00Added an answer on May 13, 2026 at 2:39 pm

    You need to call FCGI_Accept in the while loop:

    while(FCGI_Accept() >= 0)
    

    You have FCGI_Accept >= 0 in your code. I think that results in the address of the FCGI_Accept function being compared to 0. Since the function exists, the comparison is never false, but the function is not being invoked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When attempting to run IE on Windows Server 2008 under different user accounts using
I am attempting to run a threaded socket server that handles multiple clients simultaneously.
I am attempting to run the Elmah Sql Server DDL upon database generation in
Say you have a large PHP project and suddenly, when attempting to run it,
I'm attempting to eliminate leading any leading zeroes in my date when I run
Attempting to deploy a MOSS solution to a UAT server from dev server for
When attempting to run the first example in the boost::mpi tutorial , I was
I am attempting to run the following command in KornShell (ksh): set -A INDEXES
I am attempting to run some AppleScript in the terminal, just to learn how
I'm attempting to run sudo pbuilder create however, when retrieving packages a different one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.