如何在 Nginx 上运行 CGI 脚本 [英] How to run CGI scripts on Nginx

查看:36
本文介绍了如何在 Nginx 上运行 CGI 脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在设置要在 Nginx 上运行的 CGI 脚本时遇到问题,到目前为止我找到了 http://wiki.nginx.org/SimpleCGI 这个东西,但问题是我不能让 perl 脚本作为服务运行,所以它会在后台运行,即使在重启的情况下它也会自动开始运行

I have problem setting up CGI scripts to be run on Nginx, so far I've found http://wiki.nginx.org/SimpleCGI this stuff but problem is that I can't make perl script run as service so that it will run in background and even in case of restart it will start running automatically

你有什么想法吗?我正在运行 Centos 5

Do you have any idea? I'm running Centos 5

我找到了一些解决方案 此处 但我无法将那里给出的代码与 这个 Perl 脚本 集成我对 Perl 完全零,请帮助我谢谢

I've found some solutions here but I couldn't integrate code given there with this Perl script I'm completely zero at Perl, please help me Thanks

推荐答案

Nginx 是一个网络服务器.您需要为您的任务使用应用程序服务器,例如 uWSGI.它可以使用称为 uwsgi 的原生非常有效的二进制接口与 nginx 通信.

Nginx is a web server. You need to use an application server for your task, such as uWSGI for example. It can talk with nginx using its native very effective binary interface called uwsgi.

这篇关于如何在 Nginx 上运行 CGI 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆