2017-01-02 153 views

回答

2

建議放置代碼的地方是/home/bitnami/YOURAPP

創建您的應用程序後,您可能需要使用Passenger配置Apache以便在生產環境中對其進行服務。

與此內容創建在/home/bitnami/httpd-vhosts.conf一個新的文件:

<VirtualHost *:80> ServerName HOST_NAME DocumentRoot "/home/bitnami/YOURAPP/public/" <Directory "/home/bitnami/YOURAPP/public/"> Options -MultiViews <IfVersion <2.3> Order allow,deny Allow from all </IfVersion> <IfVersion >= 2.3> Require all granted </IfVersion> RailsEnv development PassengerEnabled on PassengerAppRoot "/home/bitnami/YOURAPP/" </Directory> </VirtualHost>

與雲服務器的主機名,並用正確的路徑到你的Rails應用程序的/home/bitnami/YOURAPP路徑替換HOST_NAME佔位符。

編輯/opt/bitnami/apache2/conf/bitnami/bitnami-apps-vhosts.conf文件並將以下行添加到文件的末尾:

Include /home/bitnami/httpd-vhosts.conf 重啓Apache

sudo /opt/bitnami/ctlscript.sh restart apache

保重您可能需要調整您的應用程序目錄的權限/所有權以匹配Bitnami,即sudo chown bitnami:daemon /home/bitnami/YOURAPP

相關問題