2016-05-25 13 views
0

私はセットアップこの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; 
    } 
} 

のようないくつかの追加と私のCodeIgniterのサーバブロック https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/ については、このリンクを下記の私のnginxのconfのを持っている。しかし、まだCIによってerror_404デフォルトにルーティング判明します。誰でも私を啓発できましたか?ありがとう

+0

'base_url'、' index_page'を設定しましたか? 404のURIに関してCIにログがありますか? –

+0

適切なサイトURLを持つ 'base_url'と空の値を持つ' index_page'を設定しました – ans4175

+0

この質問は無視されました。私はついにそれを理解しました、それは間違ったケースのファイル名です。私はパートナーのコミットから完全にチェックしませんでした。 – ans4175

答えて

0

それは解決され、nginxのconfのための必要はありません。単にファイル名で小さな間違いをした場合

関連する問題