将乘客从5.1.12升级到5.20后,Apache乘客停止工作
将Apache module Passenger从5.1.12升级到5.2.0后,Apache无法正确启动并退出,出现错误将乘客从5.1.12升级到5.20后,Apache乘客停止工作,apache,passenger,redmine,Apache,Passenger,Redmine,将Apache module Passenger从5.1.12升级到5.2.0后,Apache无法正确启动并退出,出现错误 # apache2ctl configtest Invalid command 'PassengerResolveSymlinksInDocumentRoot', perhaps misspelled or defined by a module not included in the server configuration Apache虚拟主机中的后注释字符串 # P
# apache2ctl configtest
Invalid command 'PassengerResolveSymlinksInDocumentRoot', perhaps misspelled or defined by a module not included in the server configuration
Apache虚拟主机中的后注释字符串
# PassengerResolveSymlinksInDocumentRoot on
Apache启动了,但Redmine无法显示目录/文件而不是主页(换句话说,找不到索引文件)
操作系统:Ubuntu 14.04.5 LTS
# dpkg -l | grep passenger
ii libapache2-mod-passenger 1:5.2.0-1~trusty1
ii passenger 1:5.2.0-1~trusty1
ii passenger-dev 1:5.2.0-1~trusty1
ii passenger-doc 1:5.2.0-1~trusty1
所有数据包都是从oss-binaries.phusionpassenger.com安装的
# cat /etc/apt/sources.list.d/passenger.list
deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main
乘客模块已启用
# a2query -m | grep pass
passenger (enabled by site administrator)
我已尝试重新安装乘客(删除并重新安装)
然而,这无助于问题的解决
# passenger-config validate-install
What would you like to validate?
Use <space> to select.
If the menu doesn't display correctly, press '!'
‣ ⬢ Passenger itself
⬡ Apache
-------------------------------------------------------------------------
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... ✓
# passenger-config validate-install
What would you like to validate?
Use <space> to select.
If the menu doesn't display correctly, press '!'
⬢ Passenger itself
‣ ⬡ Apache
-------------------------------------------------------------------------
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... ✓
PassengerResolveSymlinksInDocumentRoot
另外,我已经设法解决了这个问题
# passenger-config validate-install
What would you like to validate?
Use <space> to select.
If the menu doesn't display correctly, press '!'
‣ ⬢ Passenger itself
⬡ Apache
-------------------------------------------------------------------------
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... ✓
# passenger-config validate-install
What would you like to validate?
Use <space> to select.
If the menu doesn't display correctly, press '!'
⬢ Passenger itself
‣ ⬡ Apache
-------------------------------------------------------------------------
* Checking whether this Passenger install is in PATH... ✓
* Checking whether there are no other Passenger installations... ✓
PassengerResolveSymlinksInDocumentRoot
此选项已在5.2.0版本中根据删除
所以有两种方法可以解决这个问题
1.不要在DocumentRoot中使用符号链接
<VirtualHost *:443>
ServerName myservername
DocumentRoot /var/www/redmine
PassengerAppRoot /opt/redmine/redmine
…
</VirtualHost>
# ls -l /var/www/redmine
lrwxrwxrwx 1 root root 27 Apr 27 2017 /var/www/redmine -> /opt/redmine/redmine/public
2.在虚拟主机Apache中使用参数PassengerAppRoot(如果在DocumentRoot中使用符号链接)
服务器名myservername
DocumentRoot/var/www/redmine
Passengeraproot/opt/redmine/redmine
…
#ls-l/var/www/redmine
lrwxrwxrwx 1根根目录2017年4月27日/var/www/redmine->/opt/redmine/redmine/public
来自:
我们已删除PassengerResolveSymlinksInDocumentRoot
。这是一个古老的故事
乘客版2的兼容性选项。切换到
如果您是通过
包含符号链接的文档根目录
用于指定应用程序的根目录I使用降级版本解决此问题 1) 卸载新版本:
apt-get remove -y passenger libapache2-mod-passenger
2) 安装特定版本:
sudo apt-get install passenger=1:5.1.12-1~trusty1
sudo apt-get install libapache2-mod-passenger=1:5.1.12-1~trusty1
sudo apt-get install passenger-dev=1:5.1.12-1~trusty1
3) 启用apache模块:
sudo a2enmod passenger
4) 重新启动apache:
sudo service apache2 restart
5) 享受