给Nginx加上对Perl CGI的支持
- Sat, 13 Jun 2009 21:40:32 +0800
我们使用FastCGI的方式支持PERL CGI,所以装PERL的FCGI模块。
perl -MCPAN -e 'install FCGI'
perl -MCPAN -e 'install FCGI::ProcManager'获取fastcgi-wrapper.pl
wget http://www.ruby-forum.com/attachment/1583/fastcgi-wrapper.pl把文件保存在/usr/local/bin/里,编辑/etc/rc.local让其开机以daemon方式启动:
/usr/local/bin/fastcgi-wrapper.pl &它会建立/var/run/nginx/perl_cgi-dispatch.sock
这个sock,在Nginx的配置文件上要用到。
到nginx.conf里
加入对cgi的处理
fastcgi_pass /var/run/nginx/perl_cgi-dispatch.sock;重启Nginx即可
标签:Nginx, Perl, UNIX, WEB, 服务器
- 热门文章
- 评论
- 发表评论:





