2

We have this situation: - Apache running mod_perl - Multiple virtual hosts with own directories - Each virtual module has the same name for perl modules (development hosts, module differ a little bit, but have the same names) - Apache2::Reload for each virtual host to reload module on change

But apache throws 500 error on every 1/3 requests for the page reload and without specific error in the log, only warnings about "redefined functions".

Maybe there are some requirements to run the same module names but different paths and distinct them?

4

2 回答 2

1

这是它的完成方式:

NameVirtualHost 192.168.0.140

<VirtualHost 192.168.0.140>
     PerlOptions +Parent
     PerlSwitches -Mlib=/path/to/application
     DocumentRoot /path/to/application
     ServerName name.domain.com
</VirtualHost>
于 2013-03-28T05:03:26.550 回答
0

不,您不能“运行相同的模块名称但使用不同的路径”。Perl 只是不能那样工作。如果您想拥有多个环境,请将它们分开。-f *configfilename*您可以在各种端口上运行许多具有不同配置(请参阅选项)的 Apache 实例。然后在主服务器的每个vhost中,反向代理到后端服务器对应的端口。

于 2012-11-05T06:42:06.190 回答