我剛完成了我的第一個rails應用程序的工作,並準備部署到我的VPS。我決定嘗試使用Phusion Passenger並完成極其簡單的安裝過程。我得到了所有正確的依賴關係,所以在這方面,事情似乎沒有問題。我認爲我的問題在於路由和Apache配置文件。使用Phusion Passenger將Rails應用程序部署到LAMP服務器
至於說我加的下列文件的末尾以下內容:/etc/apache2/apache2.conf中
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.8/ext/apache2/mod_passenger.so
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.8
PassengerRuby /usr/bin/ruby1.8
<VirtualHost *:80>
ServerName localhost
DocumentRoot /home/bl/gfy/public
<Directory /home/bl/gfy/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
當我重新啓動Apache我得到以下信息:
* Restarting web server apache2 [Wed Aug 10 03:16:24 2011] [warn] module passenger_module is already loaded, skipping
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting [Wed Aug 10 03:16:26 2011] [warn] module passenger_module is already loaded, skipping
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
當我將瀏覽器指向我設置的IP時,我指出了帶有apache而不是我的rails應用程序的示例文件。
任何想法將不勝感激。
謝謝。
您是否嘗試將ServerName更改爲不是本地主機?讓我們知道發生了什麼。 –
@Thiago Jackiw我試圖將服務器名稱更改爲我的應用程序的名稱,但那也不起作用。也不是我只有一個服務器IP,沒有真正的服務器名稱供我指定。 – Bnjmn