2016-05-25 65 views
0

我安裝我的以下鏈接我的笨服務塊 https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/ 一些除了像這樣的Nginx的conf的笨導致404

server { 
    listen  80; 
    server_name domain.com; 
    autoindex on; 

    root /var/www/server; 
    index index.php index.html index.htm; 

    location/{ 
     try_files $uri $uri/ /index.php; 

     location = /index.php { 
       fastcgi_pass unix:/var/run/php5-fpm.sock; 
       fastcgi_param SCRIPT_FILENAME /var/www/server$fastcgi_script_name; 
       include  fastcgi_params; 
     } 
    } 

    location ~ \.php$ { 
     return 444; 
    } 


    location ~* ^/(assets|files|robots\.txt) { } 
    location ~ /\.ht { 
     deny  all; 
    } 
} 

的nginx的conf但事實證明還是通過CI發送到error_404默認。任何人都可以啓發我?謝謝

+0

你設置了'base_url','index_page'嗎?在CI上有關於404的URI的日誌嗎? –

+0

我已經設置了'base_url'與適當的網站網址和'index_page'空值 – ans4175

+0

對不起,因爲忽略了這個問題。我終於明白了,這是一個錯誤的大小寫文件名。該死的我沒有徹底檢查我的伴侶的提交。 – ans4175

回答

0

它已解決,不需要nginx conf。僅僅從文件名的小錯誤