2
你好,我設置我的第一個Web服務器的軌道,但是當我複製rails應用程序並運行nginx服務器,即時通訊403在瀏覽器中的錯誤和error.log說目錄索引被禁止..錯誤已解決當我在rails應用程序的公用文件夾中創建index.html,但爲什麼rails沒有啓動? (服務器與乘客complate)和捆綁安裝在Rails應用程序的作品。謝謝。Rails的nginx目錄索引被禁止
/opt/nginx/conf/nginx.conf
http {
passenger_root /home/lukas/.rvm/gems/[email protected]/gems/passenger-4.0.14;
passenger_ruby /home/lukas/.rvm/wrappers/[email protected]/ruby;
include /opt/nginx/conf.d/*.conf;
...
}
/opt/nginx/conf.d/default.conf
server {
listen *:80;
server_name hostname.org www.hostname.org
passenger_enabled on;
rails_env production;
root /var/www/default/public;
error_log /opt/nginx/logs/vhosts/default/error.log;
access_log /opt/nginx/logs/vhosts/default/access.log combined;
}
文件夾的權限
[email protected]:/var/www$ ls -al
drwxrwxr-x 13 lukas lukas 4096 Aug 30 12:26 default
IM 開始nginx的與
sudo /etc/nginx/sbin/nginx
/opt/nginx/logs/vhosts/default/error.log
2013/08/30 12:48:08 [error] 32643#0: *1 directory index of "/var/www/default/public/" is forbidden, client: xx.xx.xx.xx, server: ...
我確實運行過'chown -R root:root default /'但它沒有幫助,還有什麼我必須做的? – Muflix
現在我做了'rvmsudo rails new default',它運行歡迎屏幕,但按鈕'關於您的應用程序配置'說'Not Found 404' – Muflix
routes.rb does not work and error.log我有'open()「/ var/www/default/public/rails/info/properties「failed」我不理解它,在測試服務器上它一切正常 – Muflix