2012-12-17 41 views
0

我正在嘗試使用基於Ryan Bates railcast(它是全新的rails new testapp)的nginx和unicorn運行rails應用程序。nginx - 禁止目錄索引,即使對於chmod 777

所以第一步我只想測試nginx,沒有獨角獸 - 只能在index.htmlpublic/上工作。我指向我的testapp direcory,並得到「索引」/ var/www/testapp「被禁止」錯誤(我甚至將其全部設置爲777並得到相同的錯誤)

我的用戶名:deployer,nginx:工作進程用戶是www-data

在我的網站啓用,爲我testapp我有符號鏈接/var/www/testapp/config/nginx.conf

server { 
    listen 80; 
    server_name beta.sitename.pl; 
    root /var/www/testapp; 
} 

www/業主,它的所有文件和子目錄爲deployer和組www-data,全部設置爲775

任何想法問題在哪裏?

回答

0

嘗試適當地設定目錄索引,例如:

索引的index.html default.html中的index.php;

在您的位置塊或使用autoindex on選項。

More info here

+0

鋼軌 – Jaseem

+0

啊,對不起,沒注意它是軌道,似乎這個問題已經被編輯過這不會工作。 –