我正在爲我的cent os OS服務器5.8上的rails應用程序設置虛擬主機而苦苦掙扎。 我已經安裝了Apache即httpd。爲我的rails應用程序設置Apache +乘客5.8
然後使用gem install passneger
安裝Passeneger。
安裝工作正常。
然後使用passenger-install-apache2-module
命令爲乘客安裝apache模塊。
然後編輯/etc/httpd/conf/httpd.conf
&添加以下行來設置我的virtulhost
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.8.7-p160/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.8.7-p160/gems/passenger-3.0.17
PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p160/ruby
<VirtualHost *:80>
ServerAdmin [email protected]
RailsEnv development
DocumentRoot /var/www/college/public
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
<directory /var/www/college/public>
AllowOverride all
Options -MultiViews
</directory>
</VirtualHost>
項目的改變業主使用# chown -R apache.apache *
命令
現在,我已經在我的應用程序創建了「學生」支架apache和'學院'。 但是public/index
頁面既不顯示rails environment details
頁面,也不顯示student
模型的索引頁面。請指導我究竟發生了什麼問題,因爲我是這些服務器配置的新手。謝謝!
UPDATE: 我從公共目錄中刪除&索引頁面中創建與家庭法的控制頁面。然後,我已經設置根:到=>「頁面#家」
現在,當我檢查的dummy-host.example.com-error_log
日誌它顯示
Directory index forbidden by Options directive: /var/www/college/public/
;當我從/var/log/httpd/error_log
尾日誌它顯示
[notice] caught SIGTERM, shutting down
[notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[error] *** Passenger could not be initialized because of this error: Cannot create FIFO file /tmp/passenger.3469/.guard: Permission denied (13)
[warn] module passenger_module is already loaded, skipping
[notice] Digest: generating secret for digest authentication ...
[notice] Digest: done
[error] *** Passenger could not be initialized because of this error: Cannot create FIFO file /tmp/passenger.3471/.guard: Permission denied (13)
[notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
現在有人請告訴我最新錯誤?
UPDATE2 現在我follwed提到below.And答案現在越來越以下錯誤
[notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[error] *** Passenger could not be initialized because of this error: The Passenger spawn server script, '/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.15/lib/phusion_passenger/passenger-spawn-server', does not exist. Please check whether the 'PassengerRoot' option is specified correctly.
[warn] module passenger_module is already loaded, skipping
[notice] Digest: generating secret for digest authentication ...
[notice] Digest: done
[error] *** Passenger could not be initialized because of this error: The Passenger spawn server script, '/usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.15/lib/phusion_passenger/passenger-spawn-server', does not exist. Please check whether the 'PassengerRoot' option is specified correctly.
[notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
現在我的乘客安裝成功,那麼有什麼問題?