2010-04-27 118 views
1

几天前我在服务器错误上问了这个问题,但我没有收到任何回应,也没有多少兴趣。因为它关系到建立一个开发环境我想多所社区也许能帮助我......Passenger apache默认页面错误


我刚装了乘客和乘客县窗格上OSX。但是,当我尝试浏览到我的Rails应用程序时,我只是得到默认的Apache“它的工作原理!”页。

我检查了虚拟主机的定义,他们似乎确定,所以我似乎无法弄清楚最新错误...我已经尝试重新安装乘客和pref窗格并重新启动Apache但无济于事。

任何人都知道如何解决这个问题?

我的虚拟主机的定义是这样的:

<VirtualHost *:80> 
    ServerName boilinghot.local 
    DocumentRoot "/Users/ganesh/Code/boilinghot/public" 
    RailsEnv development 
    <Directory "/Users/ganesh/Code/boilinghot/public"> 
    Order allow,deny 
    Allow from all 
    </Directory> 
</VirtualHost> 
+0

参考,我对SF的问题是: http://serverfault.com/questions/135727/passenger-apache-default-page-error – 2010-04-27 06:26:34

回答

1

您不必手动添加虚拟主机到Apache的httpd.conf。而是使用prefpane。一旦您在prefpane中添加虚拟主机,您必须重新启动服务器

编辑:您的问题没有帮助。如果你需要帮助,你需要提供更多信息。在httpd.conf中显示配置设置!

这是它应该包含:

Include /private/etc/apache2/other/*.conf 
#Include /private/etc/apache2/passenger_pane_vhosts/*.conf 

LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so 
    PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11 
    PassengerRuby /usr/local/bin/ruby 

<IfModule passenger_module> 
NameVirtualHost *:80 
    <VirtualHost *:80> 
     ServerName _default_ 
    </VirtualHost> 
    Include /private/etc/apache2/passenger_pane_vhosts/*.conf 
</IfModule> 
# Added by the Passenger preference pane 
# Make sure to include the Passenger configuration (the LoadModule, 
# PassengerRoot, and PassengerRuby directives) before this section. 

您必须注释掉#Include /private/etc/apache2/passenger_pane_vhosts/*.conf并粘贴到<IfModule ....... >块。 这对我很有用。

+0

I AM使用pref面板... – 2010-04-27 08:44:07

+0

感谢您澄清和粘贴您的配置。事实证明,我做了一个愚蠢的,并把IfModule块后的LoadModule,PassengerRoot和PassengerRuby线... – 2010-04-27 23:18:24

+0

它的帮助很高兴! :) – 2010-04-27 23:50:15

1

我有类似的问题。它解决了我已禁用默认页面之后:

sudo a2dissite 000-default 
sudo /etc/init.d/apache2 reload