简体   繁体   English

催化剂+ mod_cgi

[英]Catalyst + mod_cgi

I recently developed a catalyst application which I would now like to deploy. 我最近开发了一个催化剂应用程序,现在想对其进行部署。 My host ( OVH ) allows perl applications via mod_cgi. 我的主机( OVH )允许通过mod_cgi进行perl应用程序。 Unfortunately, I'm used to running my catalyst apps on mod_perl. 不幸的是,我习惯在mod_perl上运行我的催化剂应用程序。 I have no experience with mod_cgi whatsoever, and I can't seem to find good documentation on how I should get my catalyst app running on mod_cgi. 我没有任何关于mod_cgi的经验,而且我似乎找不到关于如何使我的催化剂应用程序在mod_cgi上运行的良好文档。

Any chance that some of you guys could give me a hand? 你们中的某些人有机会帮助我吗? Has anyone of you ever run a catalyst app on OVH's services? 你们中有没有人在OVH的服务上运行过催化剂应用程序?

Thanks, ldx 谢谢,ldx

catalyst.pl creates a CGI program. catalyst.pl创建一个CGI程序。

Foo-Bar> cd ..
> catalyst.pl -scripts Foo::Bar
> ls Foo-Bar/scripts/

For Catalyst 5.8, the code of Foo-Bar/scripts/foo_bar_cgi.pl excluding POD looks like: 对于Catalyst 5.8, Foo-Bar/scripts/foo_bar_cgi.pl不包括POD)的代码如下:

#!/usr/bin/env perl
use Catalyst::ScriptRunner;
Catalyst::ScriptRunner->run('Foo::Bar', 'CGI');

1;

Catalyst::Engine::CGI is the base module you have to look at. Catalyst :: Engine :: CGI是您必须查看的基本模块。 If your Catalyst code is backend-agnostic you should be able to just drop that in your base app, create a CGI file through which your whole application runs, and it will all work. 如果您的Catalyst代码是后端不可知的,那么您应该可以将其放在基本应用程序中,创建一个CGI文件,整个应用程序将通过该文件运行,所有文件都可以正常工作。

The CGI environment though is going to be very much slower than fastcgi or even mod_perl. 但是CGI环境将比fastcgi甚至mod_perl慢得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM