git clone https://github.com/gnosek/fcgiwrap.git cd fcgiwrap ./configure make make install
spawn-fcgi 配置文件
使用 root 用户将导致 fastcgi 无法启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
vim /etc/sysconfig/spawn-fcgi # You must set some working options before the "spawn-fcgi" service will work. # If SOCKET points to a file, then this file is cleaned up by the init script. # # See spawn-fcgi(1) for all possible options. # # Example : #SOCKET=/var/run/php-fcgi.sock #OPTIONS="-u apache -g apache -s $SOCKET -S -M 0600 -C 32 -F 1 -P /var/run/spawn-fcgi.pid -- /usr/bin/php-cgi" FCGI_SOCKET=/var/run/fcgiwrap.socket FCGI_PROGRAM=/usr/local/sbin/fcgiwrap FCGI_USER=git FCGI_GROUP=git FCGI_EXTRA_OPTIONS="-M 0700" OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS -F 1 -P /var/run/spawn-fcgi.pid -- $FCGI_PROGRAM"
配置开机启动
1 2
chkconfig spawn-fcgi on /etc/init.d/spawn-fcgi start