apt-get install nginx libfcgi-perl wget
wget http://nginxlibrary.com/downloads/perl-fcgi/fastcgi-wrapper -O /usr/bin/fastcgi-wrapper.pl
chmod +x /usr/bin/fastcgi-wrapper.pl
把下面配置加到nginx配置中:
location ~ \.pl|cgi$ {
try_files $uri =404;
gzip off;
fastcgi_pass 127.0.0.1:8999;
fastcgi_index index.pl;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
运行:
/usr/bin/fastcgi-wrapper.pl
参考: http://nginxlibrary.com/perl-fastcgi/
评论