Welcome! Log In Create A New Profile

Advanced

multiple *.fcgi in /cgi-bin/ directory - binding

Rakesh S
June 20, 2011 08:52AM
While trying to configure fastcgi with nginx, here are the steps that
I have followed so far:


In /etc/nginx/nginx.conf:

server {
localhost 127.0.01;
..
..

location ~ ^/cgi-bin/.*\.fcgi$ {
root /srv/prod/bin;
include /etc/nginx/fastcgi.conf;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/user.socket;

}
}


/etc/nginx/fastcgi.conf:


cat /etc/nginx/fastcgi.conf

fastcgi_param SCRIPT_FILENAME /srv/prod/bin$fastcgi_script_name;
..
..
<other default values in place>


The fcgi script is now bind using the unix socket as follows:

# spawn-fcgi -s /tmp/user.socket -a 127.0.0.1 -p 9000 [ -u <user> -g
<user> -U <socketuser> -G <socketgroup> ]

This works fine for a given .fcgi script.

If I have 4 such scripts in the cgi-bin directory ( /srv/prod/bin) ,
should I be doing 4 such independent spawn-fcgi-s . Is there an
alternative to do the same ?
Related, these .fcgi mentioned are executables of a C++ program.

Any suggestions for a better installation / best practices here ? Thanks !

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

multiple *.fcgi in /cgi-bin/ directory - binding

Rakesh S June 20, 2011 08:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 214
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready