2010-04-27 117 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