如何在共享 RHEL 服务器上托管 mod_perl 应用程序?

发布于 2024-07-14 04:29:18 字数 256 浏览 8 评论 0原文

我想在共享 RHEL 服务器上托管 mod_perl 应用程序,但我无权访问 root 帐户。 mod_perl 在服务器上可用,所需的所有 Perl 模块也是如此(我的应用程序在 CGI 下运行良好)。

我预计会出现两个问题: 每当我第一次更新代码以及随后的定期更新时,都需要重新启动 Apache。 其次,我必须使用一些。 .htaccess 中的指令。 我很高兴听到其他可能成功做到这一点的人的经验、陷阱和提示。 谢谢你!

I want to host a mod_perl application on a shared RHEL server where I do not have access to a root account. mod_perl is available on the server as are all Perl modules required (my app runs fine with CGI).

Here are two problems I anticipate: Apache restarts would be required whenever I update my code the first time and subsequently on periodic updates. Second, I would have to use some <Perl> directives in .htaccess. I would be happy to hear experiences, gotchas, hints from others who might have done this successfully. Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

骑趴 2024-07-21 04:29:18

这对于您的情况可能没有用,但您始终可以运行
Apache 实例位于您的主目录中,并且具有前端代理
对该实例的传入请求。 这样,您就可以完全控制
涵盖配置、Apache 模块、Perl 模块和 Perl 本身。
它还可以更好地利用系统资源(慢速客户端不会占用系统资源)
重型 Perl 应用程序,只有精益前端实例),实际上通常是
部署 mod_perl 应用程序的推荐方法。

另一种选择,也是一种减少麻烦的选择,
获得每月 20 美元的 VPS 并使用它。 然后你就可以做任何你想做的事
想要的,因为你将拥有完全的 root 访问权限。

This might not be useful in your case, but you can always run an
Apache instance in your home directory, and have the frontend proxy
incoming requests to that instance. That way, you have full control
over the configuration, Apache modules, Perl modules, and Perl itself.
It also uses system resources better (slow clients don't tie up the
heavy perl app, only the lean frontend instance), and is actually the generally
recommended way of deploying mod_perl applications.

Another option, and one that will involve less screwing around, would
be to get a $20/month VPS and use that. Then you can do whatever you
want, as you'll have full root access.

浪推晚风 2024-07-21 04:29:18

如果无法重新启动 Apache httpd,则无法执行此操作。

也许管理员会给你 sudo 权力,这样你至少可以做到这一点。

尝试使用 FCGI 下的 Perl。

You can't do it without the ability to restart Apache httpd.

Perhaps the admin will give you sudo powers so you can do that at least.

Try Perl under FCGI instead.

一萌ing 2024-07-21 04:29:18

如果没有 root 权限,您将无法在共享主机帐户上使用 mod_perl。 “运行我自己的实例”听起来不错,但是如果服务器重新启动,您将需要一种方法来启动 apache。

FCGI 是您最好的选择。 或者获取一些可以让您获得对您自己的 apache 进程的 root 访问权限的东西。 这种帐户的额外好处是您可以安装 CPAN 模块,而无需经历设置非根库和弄乱 $PERL5LIB 的额外麻烦。

You aren't gonna be able to use mod_perl without root on a shared hosting account. The "run my own instance" sounds okay, but you will need a way to start up apache if the server reboots.

FCGI is your best bet. That or get something where you can get root access to your own apache process. The added benefit of such an account would be you could install CPAN modules without going through the extra hassle of setting up a non-root library and messing with $PERL5LIB.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文