Welcome! Log In Create A New Profile

Advanced

Fastcgi setup for C scripts?

Posted by chim 
Fastcgi setup for C scripts?
July 24, 2011 11:17AM
We have 10 legacy C scripts that we'd like to run under nginx, but we're having little luck in finding out how to do this since php and perl seem to be the main focus for nginx/fastcgi. I've taken a shot at a setup for this, but cannot get the cgi script to do anything but try to download the file itself in a pop-up Save File dialog box since it's not apparently sending its output correctly over to fastcgi, lol.

Another complication is that we'll be running an HA cluster with a Linode node balancer, 2 production Linode VPS servers and one Linode VPS staging/test server that we'll Rsync content manually from.

The traffic setup is that the node balancer has a public IP and port assignments made to the linodes, the 2 linodes each have a private IP that the balancer fwds traffic to, and then the staging server will be "sitting off to the side" on a "test.example.com" subdomain as such:

Node Balancer: 96.x.x.x
Linode 1: 192.x.x.1
Linode 2: 192.x.x.2
Linode Test: 192.x.x.10

Can any of the gurus out there help me with a step-by-step how-to summary please? I've got a single linode online for now with the node balancer and have not yet rigged up the other nodes. I'm using the virtual host setup with its conf file included into the main nginx conf file just fine. I installed spawn-fcgi package and compiled a Hello World script, ran it as a process, but cannot get it to "hook" right.

thx
Re: Fastcgi setup for C scripts?
July 24, 2011 03:08PM
Okay, just got it working by explicitly naming the cgi-bin location in the nginx default site and virtual site conf files. One of the packages may have set it up for php's or perl's directories (who knows), but setting it explicitly as an overide got 'er workin.

Dang computers- they're always doing what we TELL them to do and not what we WANT them to do, lol. I'm still waiting on computer/software systems that we can just tell them what we want and away they go- that would save gobs of debugging time!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready