Open happypeter opened 10 years ago
bundle&&restart tmp/restart.txt
made no effect.
使用了下面的配置
<VirtualHost *:80>
LoadModule passenger_module /home/peter/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/peter/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/passenger-4.0.37
PassengerDefaultRuby /home/peter/.rbenv/versions/1.9.3-p125/bin/ruby
</IfModule>
ServerName happypeter.org
DocumentRoot /home/peter/auth-love/public/
<Directory /home/peter/auth-love/public/ >
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
打开网站错误是没有了,却成了这个样子
<VirtualHost *:80>
ServerName www.happypeter.org
PassengerDefaultRuby /home/peter/.rbenv/versions/1.9.3-p125/bin/ruby
DocumentRoot /home/peter/auth-love/public/
<Directory /home/peter/auth-love/public/ >
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
改成这样,灵了
<VirtualHost *:80>
ServerName happycasts.net
DocumentRoot /home/peter/happycasts/public/
<Directory /home/peter/happycasts/public/ >
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
也不是用的 httpd.conf 开头指定的 ruby 2.0
</VirtualHost>
LoadModule passenger_module /home/peter/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0/gems/passenger-4.0.36/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /home/peter/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0/gems/passenger-4.0.36
PassengerDefaultRuby /home/peter/.rbenv/versions/2.0.0-dev/bin/ruby
</IfModule>
但是也是一样可用工作呀,不过保险起见,我还是加上吧
PassengerDefaultRuby 这个会覆盖最开头的 PassengerDefaultRuby 的设置,从而全局的改变默认的 ruby 版本。最终全局的 ruby 版本会是最后一个 <virtualhost>
中给出的 PassengerDefaultRuby
各个 <virtualhost>
应该用 PassengerRuby
报错