Nginx/fcgiwrap

Материал из ALT Linux Wiki

Настройка nginx для запуска CGI скриптов на примере collectd.

Требуется поставить пакеты: nginx fcgiwrap spawn-fcgi

/etc/sysconfig/spawn-fcgi:

## ABSOLUTE path to the spawn-fcgi binary
SPAWNFCGI="/usr/bin/spawn-fcgi"

## ABSOLUTE path to the PHP binary
FCGIPROGRAM="/usr/local/bin/fcgiwrap"

## ip to listen
## *must* be commented out for use with unix domain socket
#FCGILISTEN="127.0.0.1"

## bind to tcp-port on localhost
## *must* be commented out for use with unix domain socket
#FCGIPORT="1027"

## unix domain socket permissions
#SOCKETUSER=
SOCKETGROUP=_nginx
SOCKETMODE=0770

# allowed environment variables sperated by spaces
ALLOWED_ENV="PATH"

## if this script is run as root switch to the following user
USERID=_spawn_fcgi
GROUPID=_spawn_fcgi