如何在 Nginx 上使用 FastCGI 运行 Perl 脚本?
因此,我遵循本指南:http://technotes.1000lines.net/?p=23 我正在执行这些步骤。 我有一个使用 Debian Etch 的 VPN (slicehost.com),使用 nginx 提供一个网站(到目前为止是静态的)。 我使用 wget 下载 FastCGI,然后执行通常的 make make install 例程。
所以我想既然 FastCGI 不能正常运行 CGI 脚本,你必须使用某种类型的 perl 包装器来解释 perl。
现在我运行这个脚本
http://technotes.1000lines.net/fastcgi-wrapper.pl
我遇到了与某人在提交脚本的页面上遇到的完全相同的问题:
http://www.ruby-forum.com/topic/145858
(我不是一个红宝石人,那里没有任何面向红宝石的东西)
我不断收到一个
# bind/listen: No such file or directory
我不知道如何继续。 我将不胜感激任何帮助,并且我可以提供任何人需要的更多详细信息。
So I am following this guide: http://technotes.1000lines.net/?p=23 and I am going through the steps. I have a VPN (slicehost.com) with Debian Etch, serving a website (static so far) with nginx. I used wget to download FastCGI and I did the usual make make install routine.
So I guess since FastCGI can't normally run CGI scripts you have to use some type of perl wrapper to interpret the perl.
Now I run this script
http://technotes.1000lines.net/fastcgi-wrapper.pl
and I run into the exact same problem that a person ran into on the page that the script was submitted:
http://www.ruby-forum.com/topic/145858
(I'm not a ruby person and there is nothing ruby oriented in there)
I keep getting a
# bind/listen: No such file or directory
And I have no idea how to proceed. I would appreciate any help and I can give any more details that anyone would need.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Web服务器需要一个Unix域套接字来连接到FastCGI应用程序,但无法创建该套接字。 您想要的目录很可能不存在(因为它们是在您执行
绑定
时自动创建的)。The webserver needs a Unix domain socket to connect to the FastCGI application, but the socket can't be created. Most likely the directory you want it to be in doesn't exist (because they are automatically created when you do a
bind
).莱昂是完全正确的。 允许套接字监听有两个先决条件:
This is defined in the fastcgi-wrapper.pl script as /var/run/nginx/perl_cgi-dispatch.sock. Therefore, you will need to make sure /var/run/nginx exists.
Leon is exactly correct. There are two prerequisites for allowing the socket to listen:
This is defined in the fastcgi-wrapper.pl script as /var/run/nginx/perl_cgi-dispatch.sock. Therefore, you will need to make sure /var/run/nginx exists.
我要尝试“淡化”fastcgi-wrapper.pl,这样它就可以与 spawn-fcgi。
我已经使用了其中两个套接字:
在 /var/run 内我有:
我可以轻松启动和停止 FastCGI 包装器,并且我也想使用 Perl 来做到这一点。
如果有人已经有一个与 spawn-fcgi 一起使用的脚本,我很乐意使用它,或者至少看一下它。
干杯,
——波尔蒙
I'm gonna try and "water down" fastcgi-wrapper.pl, so it can be used with spawn-fcgi.
I use two of those sockets allready:
Inside /var/run I have:
I can easily start and stop the FastCGI wrappers, and I want to do that with Perl too.
If anyone has already a script, that works with spawn-fcgi, I'd be happt to use that, or at least have a look at it.
Cheers,
--polemon