我今天早上升级到ML,它看起来相当顺利,但与乘客的一切都已经死了。我已经将它剥离回零并且卸载了除RVM之外的所有内容,按照ML兼容性建议进入1.9.3并重新安装了Passenger,最终没有任何结果。
因为它直接设置网站或使用PassengerPrefPane,最终网站没有响应。我可以看到日志中没有任何负面信息,我的Rails设置正在使用rails s
,Apache肯定在运行。任何人都有我可以使用的指针,我现在正在画一个空白。
<VirtualHost *:80>
ServerName nicholassmith.local
DocumentRoot /Users/nicholas/Development/Websites/DWC/public
<Directory /Users/nicholas/Development/Websites/DWC/public>
Allow from all
Options -Multiviews
</Directory>
RailsEnv development
</VirtualHost>
哪个在我的httpd.conf中。但它在哪里说ServerName?它完全忽略了这一点,什么都不返回。但是,如果我去localhost,我就是在做生意,所以在这个阶段我完全不知所措。
答案 0 :(得分:0)
当我安装Mountain Lion时,它覆盖了我用新的httpd.conf;您需要将Passenger Pane vhost部分重新添加到底部。我看起来像是:
<IfModule passenger_module>
NameVirtualHost *:80
<VirtualHost *:80>
ServerName _default_
</VirtualHost>
Include /private/etc/apache2/passenger_pane_vhosts/*.conf
</IfModule>
这将低于这一行:
Include /private/etc/apache2/other/*.conf
答案 1 :(得分:0)
我刚刚解决了这个问题,所以对于其他有问题的人来说:
1)潜入httpd.conf并查找httpd-vhosts.conf 2)取消注释 3)放弃你的虚拟主机
重启apache。完成。
答案 2 :(得分:0)
Mountain Lion从我的apache httpd.conf文件中清除了LoadModule语句。通过从我备份的文件中恢复它们,然后包括我的vhosts文件,我能够再次离开:
/etc/apache2/extra/httpd.conf:
# my mods for passenger
LoadModule passenger_module /Users/lukeskywalker/.rvm/gems/ruby-1.9.3-p0/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /Users/lukeskywalker/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.11
PassengerRuby /Users/lukeskywalker/.rvm/wrappers/ruby-1.9.2-p290/ruby
在文件的下方取消注释vhosts include语句:
# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf
httpd-vhosts.conf文件中的相关设置如下所示:
<VirtualHost *:80>
ServerName lightsaber.local
DocumentRoot "/Rails/lightsaber/public"
<Directory "/Rails/lightsaber/public">
AllowOverride all
Options -MultiViews
Order allow,deny
Allow from all
RailsEnv development
</Directory>
</VirtualHost>