Home > Notes > 给Nginx加上对Perl CGI的支持

给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即可

Tag:Nginx, Perl, UNIX, WEB, 服务器
Hots
评论
发表评论:


  [TIPS:首次发表评论的朋友,需要验证]
Tags
Recent Post
Recent Comments
Links
Copyright Notes
You can reship all of these articles without permission but MUST mark the original link in your post. Please contact with me() if u have advice or other arrangements.
Copyright©2007-2011 lewphee.com All rights reserved.