Debian5 安装fcgiwrap

安装基本软件
apt-get install build-essential  libfcgi-dev

安装spawn-fcgi
wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
tar -xvf spawn-fcgi-1.6.3.tar.gz
cd spawn-fcgi-1.6.3
./configure --prefix=/usr
make
make install
 
安装fcgiwrap
wget http://github.com/gnosek/fcgiwrap/tarball/master -O fcgiwrap.tar.gz
tar xf fcgiwrap.tar.gz
cd gnosek-fcgiwrap-58ec209/
autoreconf -i
make
cp fcgiwrap /usr/sbin/
创建启动文件
http://wiki.nginx.org/FcgiwrapDebianInitScript
另附件提供下载fcgiwrap.rar
 
配置nginx
	server {
        listen   80 ;
        server_name  tube.com;
        root /var/www/osTub;
        
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
                root   /var/www/nginx-default;
        }


        location / {
                index index.php index.html index.htm;
        }

        location ~ \.php$ {
                fastcgi_pass   unix:/tmp/php-fcgi.sock;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
        }
    location ~ \.pl$ {
         gzip off;
         include /etc/nginx/fastcgi_params;
         fastcgi_pass unix:/var/run/fcgiwrap.socket;
         fastcgi_index index.pl;
         fastcgi_param SCRIPT_FILENAME /var/www/osTub$fastcgi_script_name;
     } 


}
参考:
http://wiki.nginx.org/Fcgiwrap
http://wiki.ubuntu.org.cn/UbuntuHelp:FcgiWrap
http://wiki.nginx.org/FcgiwrapDebianInitScript
http://www.bitbi.biz/tec/nginx/ubuntu-10-04-nginx-perl-fastcgi-%E9%85%8D%E7%BD%AE-432
http://hi.baidu.com/videoforlinux/blog/item/f2489ddc45035642ccbf1abb.html

上一篇: 开源视频播放系统ostube,做自己的youtube   下一篇: debian5安装转码工具来支持ostube

你问我答

  1. #1 头像 keminar 2011-10-21 15:41:07
    fcgiwrap 启动脚本里有启动的用户名要和nginx的启动用户名一致,否则会出错。
    更多请看:http://blog.linuxphp.org/archives/1373/
  2. #2 头像 handuck 2012-01-06 15:04:50
    感谢 分享!我试验下 晚上上报结果

提交疑问

回顶部