如何在共享 RHEL 服务器上托管 mod_perl 应用程序?
我想在共享 RHEL 服务器上托管 mod_perl 应用程序,但我无权访问 root 帐户。 mod_perl 在服务器上可用,所需的所有 Perl 模块也是如此(我的应用程序在 CGI 下运行良好)。
我预计会出现两个问题: 每当我第一次更新代码以及随后的定期更新时,都需要重新启动 Apache。 其次,我必须使用一些
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这对于您的情况可能没有用,但您始终可以运行
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.
如果无法重新启动 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.
如果没有 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.