2015-06-19 88 views
-1

你好我開始使用nginx,設置nginx.conf到我的項目文件夾C:/ Projects。目錄列表:403禁止nginx

我用(自動索引:上)有一個目錄列表,但不工作

worker_processes 1; 

events { 
    worker_connections 1024; 
} 

http { 
    include  mime.types; 
    default_type application/octet-stream; 
    sendfile  on; 


    server { 
     listen 80; 
     server_name localhost; 

     root C:\Project ; 
     index index.html index.htm index.php; 

     location/{ 
      autoindex on; 
     } 
     error_page 500 502 503 504 /50x.html; 
     location = /50x.html { 
      root html; 
     } 
} 

回答

0

如果目前你的root目錄裏面的index文件(或任何子目錄中的一個C:\Project下爲問題),將顯示索引頁面而不是內容索引。

您可能還想檢查您的root下的所有內容的權限;它們需要運行Nginx進程的用戶可讀。

可能是許多不同的事情;你需要在將來用你試過的和沒有嘗試過的東西來澄清你的問題。