mod_passenger.so,用yum安装在哪里?

Where is mod_passenger.so, installed with yum?

我有一个 Centos 6-Apache-Passenger-Ruby 的组合。安装是按照说明 here 进行的。我也有 whm,这意味着对 httpd.conf 的更改必须通过单击进行。尝试包含 /etc/httpd/conf.d/*.conf 时,告诉我出现错误,因为:Cannot load /usr/local/apache/modules/mod_passenger.so into server.

问题出在 /etc/httpd/conf.d/passenger.conf 的这一行:

LoadModule passenger_module modules/mod_passenger.so

句子的最后一部分应该指向实际的mod_passenger.so,那不在/etc/httpd/modules...问题是它在哪里?

我是通过yum安装的,也就是说:

sudo yum install -y epel-release pygpgme curl
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
sudo yum install -y mod_passenger

当我运行sudo /usr/bin/passenger-config validate-install的时候,不管apache安装在哪个(已经运行全部),下面说:

   You did not specify 'LoadModule passenger_module' in any of your
   Apache configuration files. This means that Phusion Passenger
   for Apache is not installed or not active. Please run the
   Phusion Passenger Apache module installer:

      /usr/bin/ruby /usr/bin/passenger-install-apache2-module --apxs2=/usr/bin/apxs

我 运行 安装程序,说一切正常,但从来没有工作...

我知道我必须像这样指定位置的位置:

LoadModule passenger_module /path/to/the/module

可是我找不到。定位 mod_passenger.so 不起作用。而且我不能去 .rvm 位置,因为不在那里。 Passenger 未安装为 gem,而是通过 yum...

有什么技巧可以找到乘客所在的位置 mod_passenger.so?谢谢。

rpm 将为您提供任何已安装软件包的文件列表,如下所示:

rpm -ql mod_passenger

这可以通过 grep 仅针对您的文件进一步完善:

rpm -ql mod_passenger | grep 'so$'

使用不同的 apache 模块包的完整示例是:

$ rpm -ql mod_ssl
/etc/httpd/conf.d/ssl.conf
/etc/httpd/conf.modules.d/00-ssl.conf
/usr/lib64/httpd/modules/mod_ssl.so
/usr/libexec/httpd-ssl-pass-dialog
/var/cache/httpd/ssl
$ rpm -ql mod_ssl | grep 'so$'
/usr/lib64/httpd/modules/mod_ssl.so