NGINX で実行されるストック CI アプリケーションがあります。書き換えなし(16時間試したけど動かなかった。500か404か403か入力ファイル指定なし)、php-fpmにphpファイルを渡す。
available-sites の下にあるデフォルトのファイルは次のとおりです (Ubuntu 12.04、CentOS ですべてを試しましたが、何も機能しませんでした)。
server {
listen 80;
root /usr/share/nginx/www/;
index index.php index.html index.htm;
server_name fish-in-a-bowl.net;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www/cloud;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
#fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
そしてconfig.php
:
$config['base_url'] = 'http://fish-in-a-bowl.net/zz/';
$config['index_page'] = 'index.php';
//$config['index_page'] = '';
//$config['uri_protocol'] = 'PATH_INFO';
//$config['uri_protocol'] = 'QUERY_STRING';
//$config['uri_protocol'] = 'REQUEST_URI';
//$config['uri_protocol'] = 'DOCUMENT_URI';
//$config['uri_protocol'] = 'ORIG_PATH_INFO';
$config['uri_protocol'] = 'AUTO';
利用可能なすべてのオプションを試しましたが、どれも機能しませんでした。このノードは Digital Ocean にあり、Apache で CI をセットアップするためのチュートリアルがありますが、NGINX はありません。
デフォルトのコントローラーは機能しますが、http://fish-in-a-bowl.net/zz/index.php/welcome経由でアクセスすると、No input file specified.
ヘルプ?これはとても奇妙です。
スクリーンショット >